In 1865 Hahn was elected as US Senator, but Radical Republicans refused to allow him and other Southerners to be seated. Later he was elected for several terms as a Republican to the state House during the Reconstruction era, where he was also elected as Speaker. He was active as a publisher and editor, owning and operating three newspapers in succession that supported the Republican Party, its program, and its candidates in the state. He spent much of his wealth in supporting these papers. Hahn continued to be politically active, being elected to Congress from the 2nd congressional district in 1884 with a strong majority, and serving about a year until his death in office.
Hahn was born as the last child in his family, in Klingenmünster, Palatinate, then part of the Kingdom of Bavaria, now of Rhineland-Palatinate, Germany; his father died before he was born. Some sources indicate that Hahn's parents were Jewish.
With his widowed mother and four older siblings, Hahn immigrated as a child to the United States, arriving in New York City. They traveled to the Republic of Texas, before settling in New Orleans in 1840. The following year, Hahn's mother died of yellow fever and the children were orphaned. With the help of his older siblings, Hahn continued his education and graduated from City High School. In 1849 at the age of 19, he began reading law under Christian Roselius, a prominent Whig attorney and later Attorney General of Louisiana. In 1851, Hahn graduated from the University of Louisiana (Tulane University) with a law degree. He worked in Roselius' office after getting his degree.
The following year Hahn was elected to the New Orleans city school board at the age of 22; he ran the school system as its director. He joined the Democratic party faction led by Pierre Soulé. In the Presidential Election of 1860, Hahn supported Stephen Douglas. He was fluent in English, French and German.
In 1860 Hahn opposed secession, delivering a pro-Union speech in Lafayette Square. He avoided taking an oath of allegiance to the Confederacy. Opposed to secession and a supporter of the Union, Hahn was elected in 1862 as a Republican and the U.S. Representative from Louisiana's 2nd congressional district, incorporating most of New Orleans, which had been occupied by Union forces. Hahn was one of two Louisiana Representatives seated in the 37th Congress, which adjourned on March 4, 1863, during the Civil War. Eventually, Hahn advised that there should be no more representation from Louisiana until it was "reconstructed." During his time in Washington, Hahn met and befriended President Abraham Lincoln.
In 1864, with almost all of Louisiana under federal occupation, General Nathaniel P. Banks, the Union Military Commander of the Department of the Gulf (responsible, among other things, for civil order in occupied Louisiana), called state elections and convened a constitutional convention. Benjamin Franklin Flanders and Thomas Jefferson Durant, prominent Unionists, opposed the moderate plan called for by General Banks. Hahn purchased a pro-slavery newspaper, the New Orleans True Delta, and used it to promote moderate Unionism supporting Banks' plan, including emancipation of slaves. Hahn ran for Governor for the Free-State Party and won the election with 54% or 11,411 votes. J. Q. A. Fellows, a conservative Democrat, received 26% or 2,996 votes; and Benjamin Franklin Flanders, the radical Republican, received 20% or 2,232 votes.
Hahn was elected as the first German-born governor of an American state. He is also claimed as the first ethnic Jewish governor in the United States; by then he was an Episcopalian.
On March 4, 1864, Hahn was inaugurated as Governor of Union-held Louisiana in an elaborate ceremony paid for by General Banks. As governor, Hahn supported universal education.
In his term, Hahn tried to gain suffrage for freedmen and free blacks, but it was too early. He approved the state's ratification of the 15th Amendment. Hahn's administration made serious attempts to ensure enfranchisement of black Louisianans, laid the foundation for a public school system for blacks, and began an aborted Reconstruction in Louisiana. Governor Hahn played a leading role in the state constitutional convention of 1864, but he was opposed by Major General Stephen A. Hurlbut, who replaced Banks as commander of the Department of the Gulf. General Hurlburt refused to recognize the state civil government of Hahn.
Hahn resigned as governor in March 1865, and was elected by the state legislature to the U.S. Senate in 1865. However, Radical Republicans did not seat him, as they believed the state had more work to do before being allowed to rejoin the Union.
Lieutenant Governor James Madison Wells succeeded Hahn as governor after his resignation.
After President Lincoln was assassinated in April 1865, Congress refused to seat any Representatives or Senators from the South until a reconstruction plan could be carried out. Senator-elect Hahn returned to New Orleans and allied with radical Republicans calling for a convention to revise Louisiana's Constitution of 1864 to include black suffrage. He was shot and severely wounded on July 30, 1866, in the New Orleans Riot.
In 1867 Hahn became editor and manager of the New Orleans Republican newspaper, his platform for opposing President Andrew Johnson's lenient Reconstruction program. In 1872 Hahn retired to a plantation in St. Charles Parish. There he established the village of Hahnville and published his third newspaper, the St. Charles Herald. On his plantation, he grew sugar cane.
From 1871 to 1878 Hahn served in the Louisiana State Legislature. He was elected as Chairman of the Judiciary Committee and Speaker of the House. In 1878 he was appointed Superintendent of the U.S. Mint in New Orleans, serving until January 1879. At that point, Hahn was appointed Judge of the 26th state judicial district, which included Saint John the Baptist, Saint Charles, and Jefferson parishes. During the 1880 elections, Hahn established and edited the New Orleans Ledger to promote Republican candidates.
Although Democrats had regained control of the state legislature, Hahn was personally admired for his integrity and consistency of position. In 1884 Hahn was elected to Congress as the Republican candidate from Louisiana's 2nd congressional district – a race which he won handily by 3,000 votes. Serving as the only Republican Congressman from Louisiana, Hahn died on March 15, 1886, in his room at the Willard Hotel in Washington, D.C. He suffered a ruptured blood vessel near his heart. His body was returned to New Orleans.
Hahn's funeral was conducted by an Episcopalian priest, and he was buried in New Orleans' Metairie Cemetery. He died poor and unmarried.