Gibbs has played in 90 Tests and 248 one-day internationals for South Africa
Batsman Herschelle Gibbs has received an apology from the sport's governing body in South Africa over the way they announced the ending of his contract.
Cricket South Africa prematurely issued a press release on Friday stating that Gibbs' contract had been cancelled.
But the CSA has now clarified its position, saying the move to end the contract came after "amicable" talks.
"It has been agreed that this is the best way forward for both parties," said CSA CEO Gerald Majola.
Gibbs, 36, released a controversial autobiography in November detailing drinking, drugs and sexual antics by him and other players.
He also criticised team-mates, calling captain Graeme Smith "too powerful".
Gibbs has played 248 one-day internationals and 90 Tests with a batting average of 41.95 in the longer form of the game.
His last appearance for his country was in May 2010, when he was out for three against Pakistan in an ICC World Twenty20 match as South Africa were knocked out of the tournament.
"Following amicable discussions, and in the best interests of South African cricket, CSA and Gibbs have announced that they have agreed to terminate Gibbs' National Cricketer Contract by mutual consent," read a joint statement between CSA and Gibbs on Sunday.
"On behalf of CSA I would like to wish Herschelle all the best for his future and to thank him for the contribution he has made to the successes of the Proteas over an extended period of time.
"Herschelle represented our country for 14 years with distinction and I don't think any cricket lover will ever forget the magnificent innings he played in the famous 438 game against Australia."
Gibbs, who remains eligible for selection for South Africa, has asked CSA to issue a "No Objection Certificate" (NOC) to allow him to play in a Twenty20 competition in New Zealand later this month and CSA has agreed to do so.
"I'd like to thank CSA, my team-mates and especially the public for the unbelievable support over the years. The fans have been incredible and they all rock. I look forward to entertaining everyone on the world stage," said Gibbs.