Lochte said in a lengthy post on Instagram that he was apologising for his role in taking the focus away from other Olympic athletes.
The 12-time gold medallist reiterated his view that a stranger pointed a gun at him and demanded money to let him leave.
Lochte had called it a robbery; Brazilian police said he and three other swimmers vandalised a petrol station toilet and were confronted by armed security guards.
“I accept responsibility for my role in this happening and have learned some valuable lessons,” said Lochte.
Two of the other swimmers, Gunnar Bentz and Jack Conger, were on their way home after being held in the country to provide information.
The fourth swimmer, Jimmy Feigen, made a deal with a Brazil judge to make a payment of 35,000 Brazilian reals (€9,500) and be allowed to leave the country later last night, his lawyer said.
“We accept and appreciate his apology,” said Mario Andrada, spokesman for the local organisers of the Rio Games.
The drama surrounding the alleged robbery — and the ever-changing descriptions of it by the swimmers — has shocked and deeply angered Brazilians, who said it cast a false negative shadow on their city and their Olympics at a time the country is eager to prove it can host the Games safely.
The rapid-fire developments came hours after police announced Lochte and three teammates had not been held at gunpoint after a night of partying, as Lochte claimed.
Instead, police said the men, while intoxicated, vandalised a petrol station toilet and were questioned by armed guards before they paid for the damage and left.
“No robbery was committed against these athletes. They were not victims of the crimes they claimed,” said civil police chief Fernando Veloso.
As Bentz and Conger were whisked through airport security and on to a plane home on Thursday night, their lawyer insisted they had nothing to do with Lochte’s story.
Lochte himself left the country earlier this week.