Peck was elected as a Republican to the Forty-first Congress to fill the vacancy caused by the death of Truman H. Hoag. He was reelected to the Forty-second Congress and served from April 23, 1870, to March 3, 1873. He did not seek renomination in 1872. He practiced medicine in Perrysburg, Ohio until his death there December 25, 1876. He is interred in Fort Meigs Cemetery.