Then he studied law, was admitted to the bar and commenced practice in Schenectady.
A member of the Democratic-Republican Party, he served in the New York State Assembly from 1816 to 1817.
In 1818 he was elected to the United States House of Representatives and served one term, 1819 to 1821.
During his term Peek was Chairman of the Committee on Expenditures in the Department of State.
In 1833 he was elected Schenectady's first City Recorder, a position equivalent to a Deputy Mayor, and he served until 1835.