He had been always a Democrat, but joined the Republican Party upon its foundation. He was a delegate to the 1856 Republican National Convention. He was New York State Treasurer from 1860 to 1861. While treasurer, he hosted first lady-elect, Mary Todd Lincoln, in a suite at the Astor House while she was visiting New York. During the U.S. Civil War, as Treasurer, Dorsheimer, along with Governor Edwin D. Morgan, awarded the clothing firm of Brooks Brothers the contract for the manufacture of 12,000 Union army uniforms. From 1862 to 1864, he was Inland Tax Collector at Buffalo.