He was initially charged with driving while suspended, but in Auckland District Court today this charge was amended to driving contrary to the terms of a limited licence.
The charge usually carries a minimum six-month disqualification, but King's lawyer John Munro successfully applied for a community-based sentence instead.
This provision can be granted if the court is satisfied it will be difficult for a person not to breach their disqualification again, and they do not pose a danger to the public by driving.
Mr Munro said disqualifying King from driving would make it difficult for him to fulfil his numerous commitments in the community, which required him to travel all over the country.
He said King dedicated much of his time to the Key To Life charitable trust, aimed at changing New Zealanders' attitudes to mental health and suicide, and his radio and television show the Nutters Club, which deals with issues surrounding mental health.
King pleaded guilty today to the amended charge and was sentenced by Judge Anne Kiernan to 200 hours of community work.
"I would hope you won't be back before the court again due to transgressions,'' she told him.
The court was told that King's licence was also suspended for three months in 1981 when he was caught drink driving.
Speaking outside the court, King said he was glad the matter was over.
"I'd like to thank the police and the prosecution for helping me along here. I was stupid, and it just pays to obey the law.''
He said it was a "spur of the moment, silly thing to do and it won't be happening again''.