John Wilson Farrelly (July 7, 1809 – December 20, 1860) was an American politician from Pennsylvania who served as a Whig member of the U.S. House of Representatives for Pennsylvania's 22nd congressional district from 1847 to 1849.
He received a limited schooling and graduated from Allegheny College at Meadville in 1826.
He studied law, was admitted to the bar in 1828 and commenced practice in Meadville.
He served as chairman of the United States House Committee on Patents during the Thirtieth Congress.
He was appointed Sixth Auditor of the Treasury by President Zachary Taylor and served from November 5, 1849, until April 9, 1853, when he resigned.