"I am deeply sorry and I apologize for letting down my family and the people of Florida I have had the privilege to represent," he said in a statement issued by his office.
The two-sentence statement did not refer to the e-mails and gave no reason for Foley's decision to abruptly abandon a flourishing career in Congress.
Foley, 52, had been a shoo-in for a new term until the e-mail correspondence surfaced in recent days.
Campaign aides had previously acknowledged that the Republican congressman e-mailed the former Capitol page five times, but had said there was nothing inappropriate about the exchange. The page was 16 at the time of the e-mail correspondence.
It was not clear what prompted Foley to abruptly decide to give up a successful career in the House.
Foley, who represents an area around Palm Beach County, e-mailed the page in August 2005. The page had worked for Rep. Rodney Alexander, R-La., and Foley asked him how he was doing after Hurricane Katrina and what he wanted for his birthday. The congressman also asked the boy to send a photo of himself, according to excerpts of the e-mails that were originally released by ABC News.
Foley's aides initially blamed Democratic rival Tim Mahoney and Democrats with attempting to smear the congressman about five weeks before the election.
The e-mails were posted Friday on Citizens for Responsibility and Ethics in Washington's Web site after ABC News reported their existence. The group asked the House Committee on Standards of Official Conduct to investigate the exchange Foley had with the boy, who served as a page for Rep. Rodney Alexander, R-La.
"The House of Representatives has an obligation to protect the teenagers who come to Congress to learn about the legislative process," the group wrote, adding that the committee, "must investigate any allegation that a page has been subjected to sexual advances by members of the House."