He formed a partnership with W. W. Scott, which lasted from 1867 to 1875, and a partnership with J. M. Martin, which lasted from 1876 to 1882. He was elected in 1872 as county attorneyofWabasha County, Minnesota, and was twice reelected (the last time without opposition), serving for six years.
In March 1881 he was appointed by GovernorJohn S. PillsburyasMinnesota Attorney General. He was afterward twice elected Attorney General, serving from 1881 to 1887. He moved to Minneapolis in May 1882 and formed a partnership with Charles H. Woods. The law firm partnership known as Woods & Hahn (now Gray Plant Mooty[1]) continued until 1886 when Hahn was elected trust officer of the Minnesota Loan and Trust Company, which he held since his death. In 1901, the governor appointed him to the Tax Commission.
Hahn was married on September 16, 1868, to Emily Loretta Martin of Mifflin County, Pennsylvania. She died in 1891. They had five children, two sons, and three daughters. Hang subsequently married Matilda Richardson of Minneapolis, who survived him along with three daughters.[2]