The beginning of the library is tied to the decision by Empress Maria Theresa of 1774, whereby 637 books, which had been salvaged after the fire at the Jesuit college in Ljubljana, were to be used in a library that was established by the Ljubljana lyceum. Under French administration, this lyceum library had the right to collect all the printed matter and editions in the territory of Carniola, and later in all of the Illyrian provinces. The library experienced particular growth under the management Matija Čop in the 1830s. Following the closure of the Ljubljana lyceum, the library grew into the provincial research library of Carniola (interview with Janežič, Helena).
After the First World War, in 1919, it was renamed the State Library, and it became the central library for all of Slovenia. Two years later, in 1921, it became the official State Library, which began collecting literature and publications from the entire territory of the then Yugoslav state. Based on the law governing universities, the library was named the University Library in Ljubljana in 1938, as in the interwar period it was also a university centre in Ljubljana. The design for the new university library building was made by Jože Plečnik at the very beginning of the 1930s. The library was completed in 1941. In 1944 it was bombed, and after the war library was restored. First, after 1945, the Slovene National Library was given its current name the, the National and University Library. The library did not take part in opposition activities, but rather represented, in a formal sense, the institution of the socialist regime in Slovenia and Yugoslavia. This is best demonstrated by the D-fund. around which the library was engaged in the sense of prohibiting anti-communist and non-communist literature (interview with Janežič, Helena).