He was born in Idria, Carniola, then in Austria (now Slovenia), the son of a mining official. He studied philosophy and theology and became a priest in 1796. His weak health prevented his undertaking parish duties, and in 1796 he occupied the post of Skriptor in the library of the Laibach Lyceum, but soon gave this up, and for forty years devoted himself to teaching in the different schools of Laibach. In 1803 he was already director of the Normal School and in 1807 prefect of the Gymnasium, which post he held till his sight failed. In his last years he was blind. He was honoured for his work there by the Emperor Francis. During the French occupation, Hladnik was appointed professor of botany and natural history in the Central School of Laibach, and presented with a piece of land to be laid out for the cultivation of the flora of Carniola. It soon contained 600 kinds of local plants.
Whilst occupied with his botanical garden, he was also delivering lectures on botany and spent his holidays for thirty years in researching the crownland of Carniola. He died in Laibach (now Ljubljana), Carniola, bequeathing his botanical collection to the Rudolfinum Public Museum, founded in Laibach in 1831. The museum contains his portrait, painted by A. von Hermannsthal. Among Hladnik's pupils was Skofitz, the founder of the Oesterr. Bot. Zeitschrift. Hladnik discovered several new kinds of plants and certain genera have been named after him. He did not publish any scientific works; his manuscripts now in possession of the Carniola Historical Society are written in Latin, German, French, and Slovenian.