Sun, the first Chinese man to win an Olympic swimming gold with his victories in the 1,500- and 400-meter freestyle events at the 2012 London Games, said that because he was usually busy with training and competing, he had weak knowledge of the law and that contributed to the mistake.
"As an athlete and public figure I should be a positive role model, but I haven't done a good job," a statement posted on the 21-year-old swimmer's microblog read. "For this reason I deeply apologize and will reflect upon myself."
Sun was also fined an undisclosed amount in addition to being ordered to serve detention, the official Xinhua News Agency reported.
Sun told his 20 million followers on the Twitter-like Sina Weibo that he had been driving a relative's SUV when it was rear-ended by a bus on Sunday afternoon in his hometown, the eastern city of Hangzhou.
Sun, who won three gold medals at the world championships in August, admitted he didn't have a driver's license and said the traffic police were still investigating him.
Calls to Hangzhou police were unanswered. Xinhua reported that after the accident police had not been able to find a record of his license and Sun had told them he did not have one. Xinhua said Sun faces a fine up to 2,000 yuan ($325) and a maximum 15-day detention.
A woman who answered the phone at the Chinese Swimming Association and refused to identify herself said the organization had heard about Sun's case and had no immediate comment.
A product of China's strict state sports system, Sun was formally censured by his training school in February after feuding with his coach and missing practice in order to make commercial appearances and spend time with his air hostess girlfriend.
He was docked a month's stipend, suspended from commercial endorsements and forced to make a public apology.
Also on HuffPost