He completed preparatory studies and graduated from the College of New Jersey (later named Princeton University) in 1836. Hager studied law and was admitted to the bar in 1840, practicing in Morristown.
He served in the United States. Senate from 1873 to 1875. In 1849, Hager moved to California and engaged in mining during the California Gold Rush. Hager served in the California Senate from 1852 to 1854, before being elected as a state district judge for the district of San Francisco in 1855.
Hagar remained a district judge until 1861.
In 1865, Hager returned to the state senate, serving until 1871, when he was elected a regent of the University of California
Hager was elected as an anti-monopoly Democrat to the United States. Senate to fill the vacancy caused by the resignation of Eugene Casserly and served from December 23, 1873, to March 4, 1875. He was not a candidate for renomination in 1874.
He was collector of customs of the port of San Francisco from 1885 to 1889. Hager died in San Francisco on March 19, 1890, one week after his 72nd birthday, and was interred at Bellefontaine Cemetery in Saint Louis, Missouri.
He practiced law in San Francisco and was a member of the 1849 California Constitutional Convention. In 1879, Hager was a member of the state constitutional convention.