In 1862, after the outbreak of the Civil War, he enlisted in the Union Army as captain of Company H, 31st Iowa Volunteer Infantry Regiment. He was promoted to major in 1864, and served until the close of the war. He participated in the battles of Chickasaw Bayou, Arkansas Post, Siege of Vicksburg, Lookout Mountain, Missionary Ridge, Kennesaw Mountain, Atlanta, and Jonesboro, and Sherman's March to the Sea.
Farwell served as member of the Iowa Senate from 1865 to 1869. He served (from 1869 to 1873) as an assessor of internal revenue, then (from 1875 to 1881) as collector of internal revenue.
In September 1880, Farwell won the Republican nomination on the 124th ballot to succeed Hiram Price as the Iowa 2nd congressional district's representative in the U.S. House. After winning the general election, he served in the Forty-seventh Congress. He won renomination in 1882, but was defeated in the general election by Democrat Jeremiah Henry Murphy. He served in Congress from March 4, 1881 to March 3, 1883.
Returning to Iowa, he served as president of the Monticello State Bank. He died in Monticello on September 21, 1909, and was interred in Oakwood Cemetery. A dispute among the beneficiaries of his will was resolved by the Iowa Supreme Court in Farwell v. Carpenter, 142 N.W. 227 (Iowa 1913).
This article incorporates public domain material from the Biographical Directory of the United States Congress website http://bioguide.congress.gov.