James Harlan was born in Clark County, Illinois, on August 26, 1820. The young Harlan supplemented his pioneer education by reading and was admitted to Indiana Asbury (later DePauw University) in 1841. After his graduation, he and his bride moved to Iowa, where Harlan became principal of Iowa City College. He was a staunch Whig and ran for state superintendent of public instruction in 1847. The election was, unfortunately for him, declared illegal. Undaunted, Harlan then studied law and was admitted to the bar in 1850.

He served as president of Iowa Wesleyan University, once from 1853 to 1855 and again from 1869 to 1870. During the intervening years, he served as a U.S. senator, first as a Free Soiler from 1855 to 1860 and then as a Republican from 1860 to 1865. As senator he concentrated on western measures, homesteads, railroads, and land-grant colleges. In 1865 he resigned his Senate seat to become Secretary of the Interior under President Andrew Johnson; in 1866 he resigned from this post when he no longer supported the president's policies. He was elected again to the United States Senate in 1867 and served until 1873. In 1868 Harlan's daughter married Abraham Lincoln's son, Robert Todd Lincoln.

The last years of Harlan's political career were spent in controversy because of false accusations of corruption while he served as secretary of the interior. He also served as the presiding judge of the Alabama Claims Commission from 1882 to 1885. He died on October 5, 1899.