In May 1807 he played twelve guest parts in Wien (Vienna) where Treitschke meanwhile held a position at the k.-k. Hoftheater (imperial-royal court theatre) and would have liked to permanently engage Ochsenheimer. To achieve this Treitschke travelled to Dresden in July and succeeded in negotiating a discontinuation of Ochsenheimer's contract with the Dresden stage. In November 1807 Ochsenheimer came to Wien and that same year the first volume of "Die Schmetterlinge von Europa" appeared. Although it could be called a greatly enlarged and revised version of the "Butterflies of Saxony" it did contain many new facts and included several new species which Ochsenheimer had received from Portugal by Hoffmannsegg, found in Viennese collections (from southern France and Russia) and in the Gerning collection. As he was not fully employed from the start in Wien he could complete the second volume (Sphingidae, Zygaenidae, Sesiidae) in 1808. That year Treitsche was forced to cut down on his workload for reasons of health, began to take up lepidopterology again and became Ochsenheimer's companion on many excursions. In 1810 the third volume (larger "macro-moths" including Psychidae) was published. Ochsenheimer purchased the Radda collection, Treitschke bought a small collection, and both were combined. With this basis Ochsenheimer went to work at the next volumes ""but from 1815 his powers were waning fast."" Volume four was completed, with Treitschke's help, in 1816. It contains supplements to the preceding volumes and a draft system of the noctuid moths (Noctuidae) with many new genera. In 1817 Ochsenheimer was instructed to revise the Lepidoptera collections of the k.-k. Hofmuseum (imperial-royal court museum), a task which took him more than a year as he included all non-European taxa. His health was deteriorating steadily and in the next volume he wrote only part of the first genus ("Acronicta"); the main work was done by Treitschke. On 23 September 1822 he fainted after a performance in Vienna; on 2 November around 10 p.m. he died.