The Mushaf of Ali is a codex of the Quran (a) that was collected by one of its first scribes, Ali ibn Abi Talib, the cousin and son-in-law of the Islamic prophet Muhammad. Ali is also recognized as the fourth Rashidun caliph and the first Shia imam. By some Shia accounts, the codex of Ali was rejected for official use after the death of Muhammad in 632 CE for political reasons. Some early Shia traditions also suggest differences with the official Uthmanid codex, though currently, the prevalent Shia view is that the recension of Ali matched the Uthmanid codex, save for the order of its content. The Twelver Shia believe that the codex of Ali is now in the possession of their last imam, Muhammad al-Mahdi, who would reveal the codex (and its authoritative commentary by Ali) when he reappears at the end of time to eradicate injustice and evil.
It is widely believed that Ali ibn Abi Talib, cousin and son-in-law of the Islamic prophet Muhammad, compiled his own transcript of the Quran, the central religious text in Islam. The recension of Ali was perhaps the earliest of its kind. An exception is the Sunni traditionist Abu Dawud al-Sijistani who contends that Ali only memorized the Quran. There are indeed reports that Ali and some other companions of Muhammad collected the verses of the Quran in writing during the lifetime of the prophet, while some other Shia and Sunni reports indicate that Ali prepared his codex immediately after the death of Muhammad in 632 CE. This preoccupation of Ali with his codex thus justifies in some Sunni sources his widely-rumored absence in the Saqifa meeting where Abu Bakr was elected caliph after Muhammad died. The Islamicist Hossein Modarressi therefore suggests that this latter group of reports was circulated to imply consensus over the choice of Abu Bakr.
In his codex, Ali may have arranged the verses in the order by which they were revealed to Muhammad, according to the Sunni scholars Ibn Sa'd, al-Dhahabi, and al-Suyuti, and the early historian Ibn al-Nadim . Their account, however, may not be consistent with other reports about the codex, including those by the Shia-leaning historian al-Ya'qubi and the Sunni historian al-Shahrastani . The codex of Ali may have also included additional information, either esoteric interpretations of the verses, according to the Shia scholars al-Kulayni, al-Mufid, and al-Tabarsi, or information on the abrogated verses of the Quran, according to al-Suyuti.
The codex of Ali, however, was not widely circulated. By some Shia accounts, Ali offered his codex for official use after the death of Muhammad but was turned down. Such reports are given by al-Ya'qubi and the Shia traditionist Ibn Shahrashub, among others. Alternatively, Modarressi speculates that Ali offered his codex for official use to Uthman during his caliphate but the caliph rejected it in favor of other variants available to him. This rejection may have in turn compelled Ali to withdraw his codex in protest, similar to Abd-Allah ibn Mas'ud, another companion who stood aloof when Uthman prepared his recension. As for its fate, it is believed in Twelver Shia that the codex of Ali has been handed down from every imam to his successor, as part of the esoteric knowledge available to the Twelve Imams. The codex would be finally revealed with the reappearance of their Hidden Imam, Muhammad al-Mahdi, who is expected to eradicate injustice and evil at the end of time.
Some Sunni reports allege that the official Uthmanid codex of the Quran is incomplete, as detailed in by the Sunni exegete Abu Ubaid al-Qasim bin Salam, among others. Supporting Ali's right to the caliphate after Muhammad, Shia polemists readily cited such reports to charge that explicit references to Ali had been removed from the Quran by senior companions for political reasons.
Yet the accusation that some words and verses were altered or omitted in the Uthmanid codex also appears in Shia tradition. Such reports can be found in by the ninth-century Shia exegete Ahmad ibn Muhammad al-Sayyari, even though he has been widely accused of connections to the Ghulat, and a letter ascribed to the Twelver imam Hasan al-Askari denounces him as untrustworthy. As the faithful recension of the Quran, the codex of Ali is thus said to have been longer than the official one, with explicit references to Ali and his descendants and supporters, although the actual differences between the two recensions are rarely discussed in sources. This view was popular before the Buyid Era among the Shia scholars, including al-Qummi and probably al-Kulayni . By contrast, any difference between the two codices is rejected by Sunnis because Ali did not impose his recension during his caliphate. The Shia counterargument is that Ali deliberately remained silent about this divisive matter. Fearing persecution for themselves and their followers, the Shia imams who followed Ali may have also adopted religious dissimulation about this issue. In some letters attributed to them by al-Kulayni, the Shia imams also reportedly advised their followers to be content with the Uthmanid codex until the reappearance of al-Mahdi.
Alternatively, the recension of Ali may have matched the Uthmanic codex, save for the ordering of its content, but it was rejected for political reasons because it also included the partisan commentary of Ali, who is often counted among the foremost exegetes of the Quran. This is close to the views of al-Mufid, Sharif al-Murtada, and al-Tusi, who were all prominent Twelver theologians of the Buyids period. The implication that the Uthmanid codex is faithful has been the prevalent Shia view ever since, with some exceptions like the Twelver traditionist Mohsen Fayz Kashani, who nevertheless held that the Uthmanid codex does not miss any legal injunctions. Some Shia scholars have thus questioned the authenticity of those traditions that allege textual differences with the Uthmanid codex, tracing them to the Ghulat, or to early Sunni traditions, while Sunnis have in turn accused Shias of originating the falsification claims and blamed them for espousing such views, often indiscriminately. The Twelver jurist Abu al-Qasim al-Khoei and some others have similarly reinterpreted the traditions that may suggest the alteration of the Quran. For instance, a tradition ascribed to Ali suggests that a fourth of the Quran is about the House of Muhammad, or the Ahl al-Bayt, while another fourth is about their enemies. The Uthmanic codex certainly does not meet this description but the inconsistency can be explained by another Shia tradition, which states that the verses of the Quran about the virtuous are primarily directed at the Ahl al-Bayt, while those verses about the evildoers are directed first at their enemies.