Mirza Husain Khan Mushir al-Daula, Sepahsalar-i A'zam (d. 1260/1882) left his collection as a waqf to the Mosque and Madrasa-yi Nasiri. After his death, Nasir al-Din Shah appointed Sepahsalar's brother, Yahya Khan Mushir al-Daula to supervise the half-completed building. See Sayyid Muhammad Baqir Najafi, Shahnama-ha-yi Iran, pp. 35-46 for an account of the library and the two Shahnama manuscripts it contains.
The Library was formerly called the Sepahsalar Mosque and Madrasa Library.