Haschka was born and died in Vienna. In his youth, he was a member of the Society of Jesus. On the suppression of the Society (1773) he devoted himself, in secular life, to poetry, this was now to become his vocation and his means of livehood. His pupil, the wealthy Johann Baptist von Alxinger, an imitator of Christoph Martin Wieland, came to his assistance. Haschka also found aid in the home of poet Karoline Pichler. Having left the Jesuits, under the influence of Josephinism, he became a freemason and wrote odes against the papacy during the presence of Pius VI in Vienna, as well as against the religious orders. He returned to Catholicism after the death of Joseph II, Holy Roman Emperor, and was selected to compose a national anthem, which was first sung on 12 February 1797, at the celebration of Francis II's birthday. Haschka was given a position as assistant in the library of the University of Vienna and was made instructor in aesthetics in the newly founded Theresianum. He retired in 1824.