The infection was related to the treatment he has had for prostate cancer over the past 18 years, his daughter, Rev Canon Mpho Tutu said.
Mr Tutu was readmitted on 28 July one week after being discharged. He will now continue his recovery at home.
Archbishop Tutu retired from public life in 2011 but continues to travel.
The 83-year-old Nobel Peace Laureate cancelled a planned trip to Rome in December following another infection.
The statement said Mr Tutu was happy with “the first-class” treatment he had received.
However, he told Health Minister Aaron Motsoaledi, that “most South Africans did not have access to decent health care”.
The archbishop also celebrated Eucharist in the hospital with daughter Mpho, it added.