Born in Union Bridge, Maryland, Farquhar attended the public schools. He studied law.
He was employed as an assistant engineer on the White River Canal until 1840. He was admitted to the bar and commenced practice in Brookville, Indiana. Secretary of the State senate in 1842 and 1843.
Chief clerk of the State house of representatives in 1844.
He was an unsuccessful candidate for election in 1852 to the Thirty-third Congress. He served as captain in the Nineteenth Infantry of the Regular Army in the Civil War.
Farquhar was elected as a Republican to the Thirty-ninth Congress (March 4, 1865 – March 3, 1867). He was not a candidate for renomination in 1866.
He moved to Indianapolis in 1870 and engaged in banking.
He was appointed secretary of state by Government. Conrad Baker. He died in Indianapolis, Indiana, October 1, 1873. He was interred in Crown Hill Cemetery.
Member United States House