He was a member of the Pennsylvania State Senate for the 16th district from 1903 to 1910. In 1906, he led the investigation of the Pennsylvania State Capitol Graft Scandal.[2] He was a delegate to the Democratic National Convention in 1904 and 1908, and chairman of the Democratic State committee in 1909 and 1910. He served as adjutant of the Fourth Regiment of the Pennsylvania National Guard for ten years.
Dewalt was elected as a Democrat to the Sixty-fourth, Sixty-fifth, and Sixty-sixth Congresses. He declined to be a candidate for renomination in 1920. He was an unsuccessful candidate for election in 1926. He resumed the practice of law at Allentown, where he later died. He is interred at Fairview Cemetery in Allentown.[3]