He is first seen arriving before Jafar and giving "a thousand apologies [to the] patient one" for being late. He mentioned he had to slit a few throats to get the other half of the Golden Scarab Beetle, but refuses to give it to Jafar until the latter pays the treasure he promised. Iago, however, snatches the scarab for Jafar, who promises Gazeem that he'll "get what's coming to [him]". As soon as the halves form together, it flies off to the Cave of Wonders' location and they follow on horseback to where the Cave forms. Jafar tells him that he can have any treasure he likes but the lamp is his. Gazeem peers down its mouth, only to be knocked back, as it demands to know who woke it up. After Gazeem introduces himself, the Cave gives him and Jafar a cryptic warning that only a "Diamond in the Rough" may enter. Jafar, not understanding what the Cave means by that, tells Gazeem to continue. Gazeem enters the Cave and breathes a sigh of relief, when suddenly the Cave violently clamps its mouth shut on top of him, killing him.
Following his demise, it clarifies to Jafar that the "Diamond in the Rough" refers to a certain person and he must find this person.
- His name is a reference to the brother of the title character in Ali Baba, a tale from the same collection of Aladdin: Arabian Nights.
- He was a boss in the Aladdin Sega Genesis, SNES, and Game Boy video game, in the third level.
- This character does not make an appearance in the Broadway musical production.
- Upon first gazing upon the Cave of Wonders, Gazeem briefly utters "By Allah...". "Allah" is the Arabic term for "God."