He was nominated as a Republican candidate to run for governor in 1876, but he declined. In 1878, Porter was appointed by President Rutherford B. Hayes as Comptroller of the United States Treasury. As Comptroller he oversaw the settlement of numerous treasury disputes dating back to the Civil War. In 1880, while Porter was still in Washington, his party again nominated him to run for Governor, without his knowledge. By the time he received word, his party was already printing campaign posters and the party leaders were able to convince him to run for the good of the party. He reluctantly accepted, and returned to Indianapolis.