Hahn was born in Frankfurt am Main. In 1847, he was named Austrian consul in Ioannina, which was then part of the Ottoman Empire, today in Greece. He was transferred to the Hellenic Kingdom on the island of Syros in 1851, and until 1869 was the consul-general in Athens. He is considered the founder of Albanian studies. He assembled and published source materials on Albanian language and culture as descendants of ancient Illyrians.