John Wesley Longyear (October 22, 1820 – March 11, 1875) was a politician and judge from the U.S. state of Michigan.
Longyear was born in Shandaken, New York. He pursued classical studies in the Lima Academy of Lima, New York, and taught school for several years. In 1844, he moved to Mason, Michigan, where he taught school and studied law. He was admitted to the Ingham County bar in 1846. The following year, he moved to Lansing, Michigan, and engaged in the practice of law.
Longyear was elected as a Republican from Michigan's 3rd congressional district to the 38th and 39th United States Congresses, serving from March 4, 1863 to March 3, 1867. He served as chairman of the Committee on Expenditures on Public Buildings during his term in Congress. He was not a candidate for re-nomination in 1866. He was delegate to the Loyalist Convention at Philadelphia, Pennsylvania in 1866 and to the Michigan State constitutional convention in 1867.
On February 7, 1870, Longyear was appointed by President Ulysses S. Grant to serve as judge of the United States District Court for the Eastern District of Michigan. In 1871, He moved to Detroit where he died in 1875. He was interred in Mount Hope Cemetery, Lansing, Michigan.