Speer was elected as a Democrat to the Forty-second and Forty-third Congresses. He was not a candidate for renomination in 1874. He was a delegate to the Democratic National Conventions in 1872 and 1880. He resumed the practice of law and in 1876 became one of the proprietors of the Huntingdon Monitor. He was an unsuccessful candidate for election in 1880 to the Forty-seventh Congress. He died in New York City in 1890. Interment is in Riverview Cemetery in Huntingdon, Pennsylvania.