The National Library of Russia was founded in 1795 under Catherine the Great as the Imperial Public Library, part of a wave of Enlightenment-era state library building across Europe, and it grew over the following century into one of the largest book and manuscript collections in the world. Its holdings gained an unusual and historically significant dimension through the activity of Abraham Firkovich, a nineteenth century Crimean Karaite scholar and collector who travelled extensively across the Russian Empire, the Caucasus and the Middle East acquiring old Hebrew manuscripts, many from synagogue genizot, storage rooms where worn sacred texts were traditionally kept rather than destroyed.
Firkovich sold his collection to the Imperial Public Library in stages during the 1860s and 1870s, giving the library, almost by historical accident rather than deliberate Judaic studies planning, one of the most important assemblages of medieval Hebrew Bible manuscripts anywhere, the Firkovich Collection. The Leningrad Codex is its single most significant item, though Firkovich's own manuscript dating claims for parts of his wider collection were later shown to include forgeries and alterations, a fact that has made scholars careful to evaluate each Firkovich-collection manuscript, including the Leningrad Codex, on its own independently verified merits rather than on Firkovich's say-so.