The original idea for establishing a National Library was from the philhelleneJohann Jakob Mayer, in an August 1824 article of his newspaper Ellinika Chronika, published at Missolonghi, where Mayer and Lord Byron had been promoting Greece's independence. Mayer's idea was implemented in 1829 by the new Greek government of Ioannis Kapodistrias, who grouped together the National Library with other intellectual institutions such as schools, national museums, and printing houses. These were all placed in a building on the island Aegina and supervised by Andreas Moustoxydis, who thus became president of the committee of the Orphanage, director of the National Archaeological Museum of Athens, and director of the National School. At the end of 1830, the library, which Moustoxydis named the National Library, had 1,018 volumes of printed books, which had been collected from Greeks and philhellenes. In 1834, the Library was relocated to Athens, the new capital, and was at first housed temporarily in the public bath in the Roman Agora of Athens and then later in the Panagia Gorgoepikoos church. The collection increased rapidly. In addition to the purchase of books from private libraries, supervised by Dimitris Postolakas, the Library accepted many large donations of books, like one from Christoforos and Konstantinos Sakellarios and one from Markos Renieris. In 1842, the Public Library merged with Athens University's library, and was housed together with the currency collection at the new building of Otto's University. The first director was Georgios Kozakis-Typaldos of the newly enlarged institution, retaining the job until 1863. At this time, the Library was enriched with significant donations and with rare foreign language books from all over Europe. With the royal charter of 1866, the two libraries merged, and were administered as the "National Library of Greece". From 1877–1910, its director was Michael Deffner. On 16 March 1888 the foundation stone for a new neoclassical marble building was laid. The building was financed by three Kefallonian-born brothers of the Diaspora, Panagis, Marinos and Andreas Vallianos. It was designed by Baron Theophil von Hansen and its construction supervised by Ernst Ziller. The Library remained in the older University building until 1903, when it was relocated to the new Vallianos building, which still partly houses the Library in addition to two other buildings, at Agia Paraskevi and Nea Halkidona.
The present building has long been inconvenient due to limited space and technology demands. Although the Vallianos building will continue to house some of its current functions, the bulk of the library in 2018 was relocated to a new 22,000-square meter building at the Stavros Niarchos Foundation Cultural Center on the Phaleron Bay "Delta". The 20-hectare Delta is a seafront area that used to host the Athens horse race track, which was replaced by the Markopoulo Olympic Equestrian Centre for the Athens 2004 Olympics. Italian architect Renzo Piano proposed a radical new plan for the National Library and the National Opera of Greece, and the project was funded by the Stavros Niarchos Foundation and donated to the Greek state. The twin buildings are integrated within a landscaped park with indigenous Mediterranean flora, and feature extensive renewable energy facilities and a central plaza around a 30-m wide seawater channel. Work on the project started in 2012 with completion due for 2016.