The history of the National Library of Peru dates back to the year 1568, when the Jesuit order founded the College Máximo de San Pablo. In 1616, the College of Chiefs for noble Indians was founded in the same place, an entity that, in 1767, changed its name to College of Princes. In that same year, the Jesuits Order was expelled from the Spanish colonies and, the following year, the Order's library became part of the Universidad Nacional Mayor de San Marcos.
Later, on August 28, 1821, a month after proclaiming independence, General Don José de San Martín signed the decree to create the National Library on the old Jesuit premises. Finally, on September 17, 1822, the National Library was inaugurated, owning 11,256 volumes that came from the old Jesuit library and from private donations.