The 21-year-old patient had his penis amputated three years ago after a botched circumcision at a traditional initiation ceremony.
In a nine-hour operation at the Tygerberg Hospital in Cape Town, he received his new penis from a deceased donor, whose family were praised by doctors.
"We've proved that it can be done -- we can give someone an organ that is just as good as the one that he had," said Professor Frank Graewe, head of plastic reconstructive surgery at Stellenbosch University.
Doctors say the man, whose identity has not been disclosed, has made a full recovery since the operation on December 11 and has regained all urinary and reproductive functions.
Also Read
"Our goal was that he would be fully functional at two years and we are very surprised by his rapid recovery," said Professor Andre van der Merwe, head of Stellenbosch's urology division.
In 2006, a Chinese man had a penis transplant but his doctors removed the organ after two weeks due to "a severe psychological problem of the recipient and his wife".
"There is a greater need in South Africa for this type of procedure than elsewhere in the world," Van der Merwe said in a statement.
African teenagers from some ethnic groups spend about a month in secluded bush or mountain regions as part of their initiation to manhood.
The experience includes circumcision as well as lessons on masculine courage and discipline.
A commission last year found 486 boys had died at the winter initiation schools between 2008 and 2013, with a major cause being complications such as infection after circumcision.
"He doesn't necessarily have the psychological capability to process this. There are even reports of suicide among these young men."
Van der Merwe described the anonymous donor and his family as "the heroes" of the story.