In 1872 Palmer was elected to the Massachusetts State House of Representatives, serving until 1874. He acted as the chairman on the Joint Committee on Railroads. He later served in the Massachusetts State Senate from 1875 to 1879 and was the chairman on the Committee for Federal Relations. He exited the Republican Party in 1879 and became a supporter of
Major General Benjamin Butler. == Mayoralty==