In 1482, the University Library was established at the University of Copenhagen which had been founded three years earlier, when its vice-rector, Peder Albertsen, donated his book collection. One of the first buildings to house the library was the House of the Holy Ghost. In 1553, the first real library building, located at the site where the university's main building stands today, was inaugurated and it served its purpose for the next hundred years.

In the first decades of the 17th century, Copenhagen experienced strong building activity under Christian IV, popularly referred to as the Builder King due to his many architectural projects. There were plans both for the construction of a university chapel and a new astronomical observatory to replace Tycho Brahe's Stjerneborg which had fallen into despair and been demolished after he had fallen out of favour and left the country. Ultimately the idea emerged to build one grand complex which was to hold both an observatory, a church and new premises for the university library.

Construction of the new building, known as the Trinitatis Complex, started in 1637. First to be completed was the observatory at the top of what is today known as the Round Tower. The new university library, located above the church and accessible only by the Round Tower's spiral ramp, was taken into use in 1652. In 1656, the Trinitatis Church was completed as the last part of the new trinity of science, knowledge and faith.

In the Copenhagen Fire of 1728, the University Library was devastated and 30,000 volumes were lost to the flames. Only some materials which against the rules had been removed from the premises by students and professors were saved. After the fire the library was restored along with the rest of the Trinitatis Complex and steps were taken to build a new collection. In 1730, Árni Magnússon bequeathed his book and manuscript collection to the library. It included, most significantly, an extensive collection of Icelandic and other Nordic manuscripts which has since besome known as the Arnamagnæan Manuscript Collection after him.[1] The library introduced loans in 1788.[1]

In the British terror bombing of the civilian population of Copenhagen in the Battle of Copenhagen in 1807, the University Library was only marginally damaged when a few grenades penetrated the roof of Trinitatis Church. Ironically, they landed in the library's section for morals and politics where they damaged a corner of Marsilius of Padua's Defensor pacis. Fragments of the grenades are now exhibited in the Exhibition Hall on the first floor of the current University Library building in Fiolstræde.[2]

Up through the 19th century it became clear that the library's premises in the Trinitatis Complex were outdated. They had become too small and the unusual access along the Round Tower's helical corridor was also impractical. In 1856, the university held an architectural competition for the design of a new library on a site in Fiolstræde, just behind the university's main building. The competition was won by Johan Daniel Herholdt.[2] Construction started in 1857 and the new building was completed in 1861. The same year the astronomical observatory also moved to a specially designed building, the Østervold Observatory, constructed on the city's old fortifications which were being decommissioned.

In 1867, the University Library was merged with the Classen Library, the third largest library in Copenhagen at the time with 30,000 volumes.

In 1930, the University Library became an independent institution directly under the Ministry of Education. Once again suffering from shortage of space, it was split into a First and Second Department in 1938. The latter moved to a new building at Nørre Allé to serve the Faculties of Science and Medicine. In 1989, the University Library's First Department, serving theology, the humanities and social sciences, was merged with the Royal Library. As of 1 January 2006, the University's Second Department was also merged with the Royal Library and changed its name to Copenhagen University Library North. Officially, the name was changed to the Royal Library, National Library and Copenhagen University Library.

Herholdt's University Library is built to a Neo-Gothic design. Its strong use of red brick heralded a new, distinctive trend in Danish architecture[2] which was to characterize many of the large cultural and civic buildings of the preceding decades.

Herholdt's design is inspired by western European, particularly northern Italian, cathedral architecture. The columns with their hive-like terminations as well as other features are inspired by the Church of San Fermo in Verona.[2] The building's gable towards Frue Plads is intended as a continuation of the seven triangular gables of the University which faces the square. The central hall and corridor were decorated by Georg Hilker, one of the premier Danish decorative painters of the time.[2]

In the 2015 drama film The Danish Girl, Copenhagen University Library was used as location for a scene in Paris where Lili Elbe (Eddie Redmayne) retreats to a library to do research about her condition.[3]