"Come on, Pete! Go get him! Knock him down!" spectators shouted as the boxing exhibition started.
King, 6-foot-2, 230 pounds, sparred for two rounds with Foley, who is several inches shorter and about 50 pounds lighter. Nobody was declared the winner, although King appeared to have Foley against the ropes several times.
"All I have to say is Josh Foley is tougher than any politician I ever met," King quipped afterward.
The congressman stepped into the ring to support the business of his friend and trainer Chris Cardona.
"We never talk politics," Cardona said. "We talk about boxing."
King said he wasn't paid for participating in the exhibition, part of a 16-fight event that drew a sold-out crowd of more than 400 people. Tickets ranged from $45 to $65.
"I have a lot of respect for him," Foley, who has known King for five years, said before climbing into the ring. "I think he stands for what he believes. I hope I don't hurt him."
King drew cheers for standing his ground with a fighter less than half his age. He said earlier that his wife refused to watch the fight, which took place on her birthday.
"Boxing is good self-defense," said King, a fan of the sport who has been training for years. "Being in the public light, you never know when you might need it."
King said he has participated in boxing events dating to 1991 to raise money for charitable causes.
His decision to help boost Cardona's business was criticized as an ethics violation by Citizens for Responsibility and Ethics in Washington. The watchdog group said King violated the House Code of Ethics requirement to avoid appearing to favor one business.
King held his ground Saturday, saying it's appropriate to assist businesses in his district. "That's what we're supposed to do," he said. "I would do it again."