The foundations for the collections in the future Naturhistorisches Museum (Natural History Museum) in Vienna were probably laid in 1748 by Emperor Francis I Stephan (1708–1765), who acquired a mineral collection from the Florentine scholar Jean de Baillou (1684–1758). Maria Theresa (1717–1780) gave the court collection to the state in 1765 and made it accessible to the public in this way. Apart from extensive purchases and gifts, the mineral collection, housed initially in the Hofburg, gradually increased as a result of scientific research and collection expeditions in Europe and beyond. This steady growth made it necessary to enlarge the depot in the Hofburg and to move many objects to other locations (Harrach'sches Haus in Johannesgasse, Augarten-Palais, Geologische Reichsanstalt in Palais Rasumofsky, Lower Belvedere). During the nineteenth century, the inventory was considerably enlarged through items brought back from expeditions, in particular the Austrian expedition to Brazil from 1817 to 1835 and the circumnavigation of the globe by the frigate Novara from 1857 to 1859. More and more space was required in the Hofburg. When Emperor Franz Joseph I (1830–1916) had the city walls demolished in 1857 to make way for the Ringstraße, a new natural history museum was also planned. Construction of the Naturhistorisches Museum began in 1871; the outside was completed in 1881 and the inside in 1884. The k. k. Naturhistorisches Hof-Museum was finally opened by the emperor in August 1889. The outbreak of the First World War meant that work in the museum and the collecting expeditions were considerably restricted. After the end of the monarchy, the museum became answerable to the State Department of Education, and in 1919 the function of museum director established in 1876 was taken over by a committee. The committee was replaced in 1925 by a First Director. Because of the shortage of space, the ethnology department was moved from the Naturhistorisches Museum to the Neue Burg, leading to the establishment in 1928 of the Museum of Ethnology (now Weltmuseum).
The reconstruction of the history of the Naturhistorisches Museum during the Nazi era is difficult owing to the lack of historical publications about the museum and the scant source material. Directly before and after the end of the Second World War records and inventories were filed away and destroyed. While the establishment of an NSDAP cell in the museum is generally cited as having taken place in 1934, according to Wolfgang Adensamer (1899–1964), head of the mollusc collection in the zoology department at the time, a cell of this nature already existed in 1932. After the annexation of Austria to the Nazi German Reich, the mineralogist Hermann Michel (1888–1965) was replaced as museum director at the instigation of the NSDAP culture department by the crustacean expert Otto Pesta (1885–1974), but remained head of the mineralogy/petrography department. Pesta, who had joined the NSDAP in 1937, was succeeded in June 1939 by the German ornithologist Hans Kummerlöwe, described in several political assessments of the NSDAP as a fanatical Nazi, who had been a Party member since 1925 and was holder of the Gold Medal of Honour. As First Director of the science museums in Vienna he was responsible not only for the Naturhistorisches Museum but also for the Museum of Ethnology, the Museum of Folk Life and Folk Art, and the Technisches Museum Wien. Within the Naturhistorisches Museum, the annexation produced not only politically motivated restaffing but also a shift towards an ideologically motivated research and exhibition policy. This can be seen in particular in the anthropology department, which was upgraded and exploited in support of the Nazi "race policy". During the Nazi era, this department participated in antisemitic and "race" exhibitions, made extensive acquisitions and took measurements of prisoners-of-war and of persons classified as Jews. The exhibition The physiological and mental characteristics of the Jews in May 1939 reinforced and gave a pseudo-scientific gloss to the antisemitic stereotype. It included Judaica seized from the Jewish Museum Vienna in 1938. Between 1939 and 1943 the anthropology department exhumed skeletons from the Jewish cemetery in Währing and purchased skulls and death masks of Polish resistance fighters and Jewish inmates of the concentration camp in Posen (today Poznań). Josef Wastl, head of the department from 1938 and director from 1941, also issued "genetic and racial" assessments as to whether specific individuals were Jews or "Jewish Mischlings" under the Nuremberg Laws. Many members of the museum's staff were conscripted into the German Wehrmacht during the war, and some conducted research in Wehrmacht expeditions to the theatres of war. A large number of natural history items from occupied territories landed up in the museum as a result. The zoologist Otto Wettstein (1892–1967) was a member of a research group in Crete in 1942, and some of the objects collected there only arrived at the museum after the war. The collection activities of the ornithologist Günther Niethammer (1908–1974), summoned to Vienna from Bonn in 1940 by his friend and former fellow-student Kummerlöwe, are particularly well known. Niethammer joined the NSDAP in 1937 and the Waffen-SS in 1940 and was a guard in Auschwitz-Birkenau for over a year, bringing seventy-four objects for the collection from the surroundings of Auschwitz for the ornithological collection and nineteen for the mammal collection. As the collections and libraries had to be safeguarded during the war, the specimens preserved in alcohol and the meteorite and precious stone collections were moved to the museum basement in 1939. A permanent air raid service was also instituted. Regular museum activities continued until 1942. In August of that year, a start was made on putting the collections into storage outside the museum, with the contents of the libraries following later on. The salvage operations were supervised by Hermann Michel. The objects were stored in bombproof basements in Vienna and in various locations on the outskirts of the city, including Schloss Laudon, Stift Klosterneuburg, Schloss Schönborn in Mallebarn, Schloss Kirchstetten bei Staatz, Tullnerbach-Lawis and Salzbergwerk Lauffen near Bad Ischl. Apart from the artillery damage during the fighting in April 1945, the museum remained relatively unscathed. The collections stored outside the museum suffered far greater damage. A fire at a castle in Ober-Höflein near Retz at the end of May 1945, for example, destroyed one-sixth of the inventory of the botany department. Collections from other departments also suffered damage as a result of substandard storage conditions. A start was made on returning the Naturhistorisches Museum collections in autumn 1945 and the operation was completed in 1947.
After the war, a special denazification committee identified 59 of the 114 staff members as having actively supported the Nazis. In 1946, thirty-five members were forced to resign on account of their former activities. From 1945 to 1951 Hermann Michel was once again First Director. The exhibition material taken from the Jewish Museum Vienna for the exhibition The physiological and mental characteristics of the Jews and the human remains from Währing cemetery were returned to the Vienna Jewish Community (IKG) in the first years after the war. The skulls and death masks were also given back to the IKG in the 1990s. Two death masks found in 1997 in the course of research into the anthropology department were left at the request of the Jewish Museum Vienna in the Naturhistorisches Museum as historical testimony. Since the adoption of the Art Restitution Act in 1998, the Naturhistorisches Museum has been conducting systematic provenance research, with a team having been formed for the first time in 2017. The dossiers drawn up by the provenance researchers to date cover more than 1,400 objects, including not only books, furniture and artworks but also mainly botanical, geological, mineralogical, palaeontological and zoological specimens. The Art Restitution Advisory Board has made recommendations on the following collections: Martin F. Glaessner (2006), Walter Hersch (2009), Fritz Illner (2019), Heinrich Klang (2019), Hans Peter Kraus (2018), Ernst Moriz Kronfeld (2011), Robert and Margarete Piowaty-Lang (2006), Georg Rosenberg (2006), Moritz Rothberger (2003), Roubicek & Purm (2007), Missionshaus St. Gabriel (2007), Martha Schlesinger (2006), Robert Wadler (2005), and Gertrude and Max Zarfl (2009). It recommended the restitution to the legitimate owners or their legal successors of just under 600 objects.