Nes ran as an Independent Democrat for one of the Pennsylvania seats in the US House of Representatives in the 28th United States Congress (1842).
In 1846 Nes ran as a Whig candidate for the same seat in the 30th United States Congress and was elected.
Nes served in the 31st United States Congress from March until September 1850, when he died in office.
A special election was held to fill his seat; the winner was Joel Buchanan Danner.
During his congressional service Nes served as chairman of the United States House Committee on Invalid Pensions and the United States House Committee on Revisal and Unfinished Business, both during the Thirtieth Congress.