The Kitab Ghanja or Kitāb Ghunjā (Chronicle of Gonja) also known as the Tadhkira li ‘I-Muta ‘akhirin (An account for posterity) is a West African chronicle written around the year 1751 and then expanded in 1764 (although some sources state the year 1800 as the date of creation) by Sidi Umar bin Suma (1751 first version), Muhammed Ibn Al-Mustafā and Umar Kanandi Ibn Umar (expanded it in 1764). The chronicle which is in Arabic documents the founding and history of the Kingdom of Gonja from the 1500s until the mid-1700s. It is regarded as one of the earliest examples of Ghanaian historiography.


According to one written history, the kingdom was founded by a southern expedition from the Mali Empire in the mid-1500s, sent by Jighi Jarra (likely Mahmud III). Jarra requested gold tribute from Begho, but the state refused, causing him to send a cavalry force led by two princes; Umar and Naba. Umar stayed in Begho after its conquest whilst Naba attacked Buna and then settled east of it around Buipe, a key town in the trade route from the Southern regions to the north. Naba ruled from 1552 until 1582. The kingdom converted to Islam under Naba's successor Manwura (reigned 1582–1600 or 1580–1599) who was converted by Muhammed Al-Abyad, a Muslim scholar who originally came from Begho with his father Faqih Isma'il, who became muslim advisors to the Yagbumwura (paramount chief/king).
The foundation of a new dynasty occurred after the fall of the dominant Songhai Empire (1591), when the Mandé Ngbanya tribe led by Sumaila Ndewura Jakpa migrated over the Black Volta River, founding the capital at Yagbum.

The Chronicle was started in 1751 by Sidi Umar bin Suma, a descendant of Al-Abyad. Bin Suma was the Imam of Buipe Mosque who assumed the office in 1747. Later in 1764, it was expanded by Muhammed Ibn Al-Mustafā and Bin Suma's son Umar Kanandi Ibn Umar, two Dyula scholars who resided in Buipe, one of the paramount cities in the Kingdom. They came from the Kamaghatay clan who had migrated to the region during the invasions by Naba. One of the versions begins:
These are the words of […] Imam Imoru Konandi, son of Imoru, and Al Hajj Mahama, son of Mustapha

The Chronicle is a collection of oral traditions and earlier literary fragments regarding the kingdom's history, as well as the history of the neighbouring kingdoms of Asante, Dagomba, Bonduku, Mamprusi, Buna and Kong. The chronicle was inspired, either directly or indirectly by the Ta’ rikh al-Südān and the Ta' rikh al-Fatash, earlier chronicles from Mali. Not much is known about the two authors, Al-Mustafā went on the long pilgrimage (Hajj) from Ghana to Mecca before writing the chronicle (c. 1732), whilst Ibn Umar was the Imam of the Buipe mosque where King Jakpa was buried. One of Ibn Umar's grandsons helped author an Arabic chronicle of the Asante kingdom, commissioned by Asantehene Osei Bonsu, this Asante chronicle no longer exists. The Gonja Chronicle is part of the Tarikh genre of books, and was part of a wider Arabic literary tradition in northern Ghana and other West African kingdoms, many of these chronicles and other books from Gonja were written in Hausa. The chronicle describes the founding of the Gonja Kingdom and the expedition of the two princes as follows:
They conquered the town...and took the gold [they found] there. This gold was kept in two houses. Each year he used to take [some of it] out to bring to his father and give it to him. Then the senior son said to his brother, 'O brother we have heard another report that the gold which we have found was previously in another town; the name of this town is Ghūna [Buna, Ivory Coast]. Therefore go there in war, quickly, in no time, then come back quickly, so that we may go back to our town'
Another part of the chronicle describes how the Kingdom became muslim during a war, the chronicle states:
The king was waging war...He had a fierce battle on that day, a Friday. The sun's heat became intense, and he was in the sun. The faqih [Muhammad al- Abyad] saw a big tree near the enemy and said to the king, 'Why don't we go in the shade of this tree'? 'How can we sit in its shade,' asked the king, 'for it is nearer to the enemy whom we cannot defeat'? The faqih replied, 'If Allah wills, we shall defeat the unbelievers and sit in the shade.' The faqih went forward followed by the king until [they came] under the tree. The faqih had a staff in his hand which he planted in the ground leaning towards the enemy. The enemy was defeated by the power of Allah.... When the king of Gonja saw this, it made him wonder. 'This religion,' he realized, 'is better than our religion.' He became devoted to Islam. 'They were converted to Islam, he and his brothers...
The first English translation was made in 1954 by author Jack Goody.