Selçukname is an informal term used for any of a number of medieval chronicles about Seljuk history written by different authors, mostly in Persian. It is also used for the 15th century Ottoman chronicle Tevârih-i Âl-i Selçuk (History of the House of Seljuk, also called O?uznâme-Selçuklu târihi by some Turkish language sources, Ottoman Turkish: Târih-i Âl-i Selçuk). The Ottoman chronicle, written by Yaz?c?o?lu Ali in Ottoman Turkish, is the only official history of the Imperial Court from Murad II's reign and serves to establish a narrative of the Ottoman dynasty's claim of descent through the Seljuks.
Ibn Bibi was born as the son of refugees from Khwarazm and Khorasan who had fled their native lands following the death of the last ruler of the Khwarazmian dynasty, Jalal ad-Din Mingburnu. Ibn Bibi attained a high position in the Seljuks of Anatolia as a "seal holder" and was responsible for all Seljuk correspondence. His mother had held a position in the Imperial Court of Khwarazm as an astrologer. She had managed to find a position in the court of the Seljuk sultan Kayqubad I. Thus Ibn Bibi began his service in the Seljuk Court during the reign of Kayqubad I, which continued even after the Battle of Köse Da?, when the Sultanate of Rum, defeated by the Mongol Empire, became vassals of the Ilkhanate.
Historian Ali Anooshahr has proposed that Ibn Bibi's chronicle of Seljuk history, called Selçukname, followed a common pattern that can be found in earlier chronicles written by medieval Persian historians Abu'l-Fadl Bayhaqi and Nizam al-Mulk. Anooshahr calls this pattern the "triad of kings", beginning with a ghazi founder king who lives a life of hardship as a wandering dispossessed warrior prince who "returns" to regain his throne. The second king of the triad is a ruler over ghazis during a prosperous and stable era, and the third king is depicted as a debauched and inexperienced ruler who loses the kingdom to a new group of ghazis.
The author of the 15th-century Ottoman chronicle Tevârih-i Âl-i Selçuk (Ottoman Turkish: ) was Yaz?c?o?lu Ali (literally "Ali the clerk's son"), who was a civil servant during the reign of Murat II. He was sent to Mamluk Egypt as an Ottoman ambassador. Other than that, there is no information about his personal life. However, there were two other Yaz?c?o?lu's in the same period who are thought to be his brothers, Ahmet Bican and Mehmet Bican, and their father was Selahattin from Gelibolu (now a district center of Çanakkale Province in Turkey) who was a katip (clerk) and the author of an astrology book. Since Yaz?c?o?lu means "son of clerk" the supposition about Ali's family is justified.
In the early days of the Ottoman Empire, Ottomans suffered from accusations about their origin. Both Kad? Burhaneddin and Timur questioned Ottoman sovereignty in Anatolia. Kad? Burhaneddin made fun of the Ottomans by replacing the word kay?kç? ("boatman") instead of Kay?, the name of the Ottoman family's tribe. The Ottomans tried to prove their nobility. Murat II was especially uneasy about the accusations and Yaz?c?o?lu Ali was tasked to write a book about the origin of the Ottoman family.
The Selçukname discusses briefly the Ottoman dynasty genealogy by asserting Ottoman descent from the Seljuks of Anatolia. Selçukname is the only official history of the Imperial Court from Murad II's reign.
There are five sections. The first section is about the pre-Islamic age of the Turks. In this section Ali claims that the Ottoman dynasty is the continuation of the legendary Oghuz Khagan.Karluks, Uygurs and Kypchaks (medieval Turkic people) were also mentioned in this section. The second section is about the Seljukid Empire.The third section is actually a translation of Ibn Bibi's book. The fourth section is about Keyqubad I (1220-1237) of the Seljuks of Anatolia and Osman I (1298-1326) of the Ottomans. The last section is a summary of Anatolia after the death of Gazan Khan of the Mongols.(1304)
The 15th century Ottoman Selçukname includes within it a 65 line O?uzname fragment, so the latter term may occasionally be used by scholars to refer to this text. Yaz?c?o?lu Ali uses the term O?uzname in the text in reference to earlier Uyghur language texts, and it is possible the author made use of these Uyghur language texts. These earlier texts, attested to in multiple medieval sources from the Ottoman period, have not survived into the present day. Some of the names from the Book of Dede Korkut, considered to be one genre of O?uzname, are repeated in the Selçukname.
Ali Anooshahr has written that certain aspects of Ibn Bibi's earlier work were modernized and updated with 15th-century terminology such as top (cannon ball) and tüfek (gun), whereas the original 13th century Persian language text had used the term manjaniq (siege engine).