In 1777 he became a professor of theology and oriental languages at the University of Kiel. On the recommendation of Johann Andreas Cramer he received a three-year scholarship from the Danish king's court. Moldenhawer and Tychsen were sent into Spain in 1783–1784 to examine and collate manuscripts. In 1784 he became a professor of church history and dogma in Copenhagen and contributed to the progression of Rationalism in Denmark. In 1784 he visited Alcalá with hope of finding Greek manuscripts of the New Testament used in the Complutensian Polyglot. According to his relation he did not find any manuscript. In 1786 Moldenhawer was sent again to Spain, this time on a confidential diplomatic mission.
From 1788 Moldenhawer was the chief librarian of the Royal Danish Library. His main interest was to increase the library's collection of recent scientific literature. Under the management of Moldenhawer, the library's book collection reached 250 000 volumes, and on Moldenhawer's death the library acquired a part of his 12,000 volume private library. Moldenhawer received numerous honors for his work. In 1809 he became a Knight of the royal Danish Order of the Dannebrog. Besides administrative talents Moldenhawer was also an author. He brought from his travels numerous excerpts and collations, including political history, church and literary history, theology and oriental philology. He was always heavily occupied with his work and duties, especially library work, which was his favorite duty. At auction for the printed books he bought over 50,000 volumes for 10,000 thalers from the former private collection of Otto Thott. 6159 books of this collection were printed before 1530. He made a second major acquisition in 1796 when he acquired the book collection of Peter Frederik Suhm. Moldenhawer purchased this collection on the condition that the payment would continue in the form of an annuity for Suhm and his wife, but both died shortly after the purchase was completed. In 1797 he purchased the collection of Müllerske Pinakothek. In 1803 Uldallske donated his manuscript collection to the library.
Moldenhawer was a Freemason and is also known to have been a member of the Illuminati. During his 35 years as the chief librarian the Royal Library flourished and the number of volumes increased through purchases and valuable donations. Moldenhawer himself donated many valuable manuscripts, letters and printed books, many of which he had acquired illegitimately during his travels in Germany, France, England, Italy, Spain, and the Netherlands, and many of which came from the libraries of old monasteries. According to Ada Adler, Moldenhawer robbed several libraries in Paris, particularly the library at Saint-Germain-des-Prés, from which Moldenhawer allegedly had acquired several manuscripts without payment. This has however never been substantiated.
Personal life
He constructed the country house Vilhelmsdal at Strandvejen north of Copenhagen in 1806. It was designed by Christian Frederik Hansen. He sold the property to the confererensraadPeter Pedersen in 1831.
Works
Versuche über das erste Buch Mosis, 1780
Das Buch Hiob übersetzt und erklärt, 2 Vol., Leipzig, 1780/81
Die Bibel in ihrer wahren Gestalt, für ihre Freunde und Feinde, 3 Vol., Halle, 1786/87
Prozeß gegen den Orden der Tempelherren. Aus den Originalacten der päpstlichen Commission in Frankreich, Hamburg, 1792.
Über den Ursprung und Fortgang der spanischen Inquisition, 1794
Oratio, qua Andreae Petro Comiti de Bernstorff in Auditorio regiae Universitatis Havniensis superiori die 25 Martii 1798 parentavit D. G. M., 1798
Über den Ursprung der Bücherzensur und die Censurverordnungen, 1802
Über den Einfluß, welche die den Juden in Spanien eingeräumten Rechte im Mittelalter auf die Staatsverfassung und das öffentliche Wohl hatten, 1806
Hannibal Schestecks erste Ambassade in Frankreich, 1806–1808
Catalogue supplementaire des manuscrits grecs de laBibliothèque Royale de Copenhague. Par A. Adler. Avec un extrait du catalogue des manuscrits grecs de l'Escorial redige par D.G. Moldenhawer, 1916.