: Soviet pioneer releases genie from millennium imprisonment. After magical and funny adventures, the ancient genie is re-educated and finds its place in the modern world.
The story begins with an acquaintance with one of the main characters - Vladimir Kostylkov, a simple Soviet pioneer who was lucky enough to get an ancient jug from the bottom while swimming in the lake. Of course, curiosity does not allow him to take the find to the police station without looking inside, and from that moment real miracles begin to occur in Moscow. Indeed, for several millennia, a real genie, Gassan Abdurrahman ibn Khottab, has been languishing in a jug for several millennia, who, after his release, swears allegiance to his young savior.
The temporary gap between the Soviet Aladdin, Volka, and the ancient Eastern genie Hottabych is so huge that two heroes constantly fall into ridiculous situations. Eager to help the incomparable Volka ibn Alyosha, Hottabych hurries with him for an examination in geography and “impresses” ordinary Soviet teachers with extensive knowledge in the field of the subject. Examiners are surprised to learn that the main representatives of the fauna in India are gold-sized ants the size of a dog, the Earth has the shape of a flat disk, and the horizon is called "the edge where the crystal dome of heaven is in contact with the edge of the Earth."The first miracle created by Hottabych ends with Volka's crushing failure in the exam.
The frustrated pioneer hesitates to tell the genie that the exam is not at all “excellent”, rightly fearing that the genie’s anger will fall on “ignorant teachers”. However, going to the cinema turns out to be even more disastrous for Volka. The day’s session has already ended, and in order to please his sorrowful overlord and help him get into the cinema for an evening session for adults, the genie awards the sixth-grader Kostylkov with a full beard. And the friend of Volka, Zhenya Bogorad, whom he met in the cinema, is sent to distant India to stop the spread of rumors about a bearded boy. But Zhenya does not stay in India for long - Volka makes Hottabych fly behind him on a carpeted plane and pulls Zhenya out of the arms of too friendly Indians.
As Zhenya and Volka are not trying to accustom Hottabych to the realities of modern life, the genie, accustomed to the ancient Eastern orders, continues to go on the wrong track, arranging a commotion near a street kiosk, in a circus, in a stadium ... There are noble deeds on his account: for example, he upsets inhumane mercantile alien, sends foolish guys to the police station and even does justice in Italy.
At the very end of the story, friends go on a cruise along the Arctic Ocean on the Ladoga steamboat. Zhenya finds an old jug and releases his brother Hottabych - Omar Yusuf. Brothers are completely different.If Gassan is a genie genial, then Omar is heartless and selfish. According to the tradition of genies, he immediately tries to kill the one who released him, and only Khottabych’s intervention saves Zhenya. Omar is stubborn and does not believe in many scientific discoveries, for example, that the Moon is the satellite of the Earth. He goes to check this and becomes a captive of the earth's orbit. Having talked with his brother, Hottabych understands how far behind life he is and begins to make up for lost time.
Time passes. The children study for one "five", because all the knowledge they need to pass Hottabych, who became a very diligent student. Zhenya chooses the profession of a doctor, Volka wants to become a radio designer. Khottabych first dreams of working in the Arctic, but his respectable appearance and profile, where he writes the truth, prevents him from getting there. Nothing prevents the genie from becoming a young man, but he no longer wants to cheat. Over time, Hottabych takes an example from Volka and is also interested in radio technology. At this, the author says goodbye to the genie and his young friends.