The Codex has had an eventful history. In the mid-11th century, about a century after it was written, the text was delivered to the Karaite community of Jerusalem, apparently after having been purchased from the heirs of Aharon ben Asher. Not long after (either in 1079 by the Seljuks or in 1099 by the Crusaders) it was looted from Jerusalem and eventually wound up in the Rabbanite synagogue in Cairo, where it was consulted by Maimonides. Maimonides' descendants brought it to Aleppo, Syria, at the end of the 14th century. The Aleppo community guarded it zealously for some six hundred years. Indeed, it proved almost impossible for outsiders to examine it. Paul Kahle, when revising the text of the Biblia Hebraica in the 1920s, tried and failed to obtain a photographic copy. (He therefore used the Leningrad Codex for the third edition, which appeared in 1937.)
Almost the only person allowed to compare it with a standard printed Hebrew Bible and note the differences was Umberto Cassuto. This secrecy made it impossible to confirm the authenticity of the Codex, and indeed Cassuto doubted that it was Maimonides' codex, though he agreed that it was 10th Century.
During the riots against Jews and Jewish property in Aleppo in December 1947, the community's ancient synagogue was burned and the Codex was damaged, so that no more than 295 of the original 487 leaves survived. In particular, only the last few pages of the Torah are extant.
The missing leaves are a subject of fierce controversy. The Jews of Aleppo claim that they were burned. But scholarly analysis has shown no evidence of fire having reached the codex itself. Scholars instead accuse members of the Jewish community of having torn off the missing leaves and keeping them privately hidden. One "missing" leaf has turned up and been brought to Jerusalem since the anti-Jewish riots in 1947.
In January 1958, the Aleppo Codex was brought back to Jerusalem, where it remains in the Shrine of the Book at the Israel Museum. This finally gave scholars the chance to examine it and consider the claims that it is indeed the manuscript referred to by Maimonides. The work of Moshe Goshen-Gottstein on the few surviving pages of the Torah seems to have confirmed these claims beyond reasonable doubt. Goshen-Gottstein suggested (in the introduction to his facsimile reprint of the codex) that not only is it the oldest known Tanakh in one volume, it was the first time ever that a complete Tanakh had been produced by one or two people as a unified entity in a consistent style.
The Aleppo Codex is the source for several modern editions of the Hebrew Bible, including the two editions of Mordechai Breuer and "The Jerusalem Crown" (printed in Jerusalem in 2000, with a text based on Breuer's work and a newly-designed typeface based on the calligraphy of the Codex and based on its page-layout).