- Doraemon: Nobita's Dorabian Nights bafflingly features Cassim as the leader of the 40 thieves. The thieves' cave appears in the story as well, where it turns out to be the secret entrance leading to Sinbad's magical palace.
- Gundam Build Divers Re:RISE: Parviz's Valkylander has the nickname "Morgiana".
- Black Panther (1977): Abner Little talks about Ali Baba as if he was Aladdin, but they're two completely different folk tales, and Ali Baba had no interactions with genies.
- The Wizard of Id. On being introduced to Ali Baba, the King asks if he's the famous Ali Baba of the Forty Thieves and is told, "We changed the name to OPEC."
Film - Animation
- Aladdin and the King of Thieves revolves around Aladdin reuniting with his long-lost father, who is the titular leader of the 40 thieves.
- DuckTales the Movie: Treasure of the Lost Lamp begins with Scrooge McDuck trying to find the treasure of Collie Baba and his Forty Thieves.
- Referenced in The Famous Five. In Five Go Off to Camp, the brick walls which open to reveal secret tunnels make George think of "Ali Baba and the Forty Thieves". Dick even says "Open Sesame!" when one of them opens.
Music
- Licensed to Ill: One of the lyrics in "Rhymin & Stealin" is "Ali Baba and the forty thieves", which is sung eight times in a row.
- The Muppet Show: The episode featuring Marty Feldman is inspired by Arabian Nights. One of the sketches in the episode is based on "Ali Baba and the Forty Thieves".
- Sesame Street was named after "Open Sesame!" Other references include:
- A "Monsterpiece Theater" sketch is titled "Ali Baba and the Forty Thieves". Cookie Monster, as Alistair Cookie, tries to tell the eponymous story, introducing Ricardo Monsterbán as Ali Baba, but the Forty Thieves demand to be introduced as well, so Cookie introduces them one by one. It takes so long to count the Thieves that Cookie runs out of time to actually tell the story.
- In a Sesame Street News Flash, Kermit the Frog interviews Ali Baba, who has trouble remembering the incantation to open the cave, only that it involves a foodstuff starting with S. At the end, Kermit does it by accident when he says, "Tomorrow we will open Sesame Street News …."
- An animated insert from the 1970s uses Ali Baba to teach the Spanish word abierto.
- Grimms Notes featured Alibaba and Morgiana as playable characters, and the 40 thieves' leader as an event boss (and he is called Kodjia)
- "Open Sesame!" is one of the achievements in Genshin Impact.
- In Honkai: Star Rail, March 7th tries to open the gate to Svarog's lair by shouting "Open sesame!"
- Rugrats Castle Capers has a level called "Ali Baby and the 40 Fleas", which takes place in an Arabian city as the babies ride flying carpets. The boss of this stage is Angelica as a genie.
- One of the episodes in Sly Cooper: Thieves in Time is titled "40 Thieves". The year in which the episode takes place, A.D. 1001, is another reference to Arabian Nights, as its actual translation is One Thousand and One Nights. Also, at one point, Sly tries saying "Open sesame" when he finds a locked door. Salim doesn't get the reference. Ironic, since Salim was a member of the Forty Thieves.
- Sonic and the Secret Rings is a game where a few Sonic the Hedgehog characters are playing the roles of characters from Arabian Nights, with Tails playing the role of Ali Baba.
- Animaniacs (2020): In "1001 Narfs", Pinky and the Brain try to entertain the bored Sultana with stories based around Arabian Nights, including "Ali-Ba-brain and the Forty Thieves".
- Carmen Sandiego: V.I.L.E. only graduates forty students a year. Naturally, Carmen once refers to them as the Forty Thieves.
- Garfield and Friends: One episode is titled "Alley Katta and the 40 Thieves".
- The Great Grape Ape: One episode is titled "Ali Beagle and the 40 Grapes".
- The Looney Tunes short Ali Baba Bunny, as indicated by its title, is inspired by the story of "Ali Baba and the Forty Thieves". It's about Bugs Bunny and Daffy Duck ending up in a treasure-filled cave whose entrance can only be opened by the incantation "Open sesame".
- The Perils of Penelope Pitstop: In "Arabian Desert Danger", Penelope searches for Ali Baba's treasure cave. No sooner does she find it than the Hooded Claw steals the treasure and traps her in the cave.
- Popeye the Sailor Meets Ali Baba's Forty Thieves is about Popeye, well, meeting the Forty Thieves and fighting them.
- Teen Titans Go!: In "What a Boy Wonders", Raven's story is based on "Ali Baba and the Forty Thieves".