The Thousand and One Nights, known as Alf Layla wa Layla in Arabic and Hazar u Yak Shab in Persian, which contains the stories that Shahrazad tells her husband Shahriyar every night, is a work that is popular all over the world. Shahriyar, who has been betrayed by a woman, tries to take revenge on women by killing his wives the next morning after marrying them the day before. In order to arouse Shahriyar’s curiosity and thus survive, Shahrazad stops telling the story at the most exciting moment every night for a thousand and one nights. Recent scholarship assumes that the Nights is constructed on Hazar Afsana and Sindbadnama, which are considered to be texts of Persian and Indian origin, although few scholars emphasise the possibility of other sources. This article examines the extent to which the Nights is based on Persian sources and contains Persian motifs and elements, focusing on the story of “The History of Gharib and his Brother Ajib”. This article argues that this story, which in its early version was a Mamluk tale, was Persianised in the Medieval Era through the incorporation of Persian elements and motifs, and ‘Qajarised’ in the nineteenth century via Nasir al-Din Shah’s illustration project of the Nights. The article discusses the extent as well as the ways that this Persianisation and Qajarisation took place. The article argues that the Qajars used the text to connect not only to Iran’s ancient past but also to the Islamic golden age in order to legitimise the Qajar dynasty and propagate its authority. In doing so, an additional contribution to the discussions on the Persian sources and motifs of the Nights and on the way the Qajars used the past to legitimise and propagate their power and authority, which have already been discussed by scholars from different perspectives.