The anonymous allegation against Republican Chris Myers, a father of two, included a photo of a man who appeared to be him in his underwear.
The person making the allegation claimed to be a prostitute. He said Myers contacted him through a male escort website and they met at a Newport Beach, Calif., hotel. He complained Myers paid him $500 but didn't fulfill promises of a car and other gifts. He said on the website that the broken promise was the reason he was taking his story public.
The website was taken down soon after becoming public.
Myers, in an interview with a reporter for the Courier-Post newspaper in October, refused to comment on the allegations but didn't deny them. At a November township council meeting, Myers denied the claims, calling the Internet "a murky, anonymous place."
His resignation letter submitted to town officials Monday did not mention the scandal.
"My work commitments will not allow me to devote the time that is needed in the months ahead," Myers wrote.
Some other council members have complained that the allegations against Myers have gotten in the way of the business of the town of 23,000 residents about 20 miles east of Philadelphia. Myers missed one township council meeting and postponed another after the allegations surfaced.
Myers won the GOP nomination for a congressional seat in 2008 but lost the general election. He has been suspended as a vice president at technology manufacturer Lockheed Martin Corp.