The 21-year-old recipient, whose identify is being protected, lost his penis in a botched circumcision.
Doctors in Cape Town said the operation was a success and the patient was happy and healthy.
The team said there was extensive discussion about whether the operation, which is not life-saving in the same way as a heart transplant, was ethical.
There have been attempts before, including one in China. Accounts suggested the operation went fine, but the penis was later rejected.
The man was 18 and already sexually active when he had the circumcision.
The procedure is part of the transition from boyhood to adulthood in parts of South Africa.
The boy was left with just 1cm of his original penis.
Doctors say South Africa has some of the greatest need for penis transplants anywhere in the world.
Dozens, although some say hundreds, of boys are maimed or die each year during traditional initiation ceremonies.
Surgeons at Stellenbosch University and Tygerberg Hospital performed a nine-hour operation to attach a donated penis.
One of the surgeons, Andre Van der Merwe, who normally performs kidney transplants, told the BBC News website: "This is definitely much more difficult, the blood vessels are 1.5 mm wide. In the kidney it can be 1 cm."
The team used some of the techniques that had been developed to perform the first face transplants in order to connect the tiny blood vessels and nerves.
The operation took place on 11 December last year. Three months later doctors say the recovery has been rapid.
Full sensation has not returned and doctors suggest this could take two years.
However, the man is able to pass urine, have an erection, orgasm and ejaculate.
The procedure required a lot of preparation.
The team needed to be sure the patient was aware of the risks of a life-time of immunosuppressant drugs.
Also some patients cannot cope with a transplant if they fail to recognise it as part of their body.
"Psychologically, we knew it would have a massive effect on the ego," said Dr Van der Merwe.
It took "a hell of a lot of time" to get ethical approval, he added.
One of the concerns is a heart transplant balances the risk of the operation against a certain death, but a penis transplant would not extend life span.
Dr Van der Merwe told the BBC: "You may say it doesn't save their life, but many of these young men when they have penile amputations are ostracised, stigmatised and take their own life.
"If you don't have a penis you are essentially dead, if you give a penis back you can bring them back to life."
Further attempts on other patients are expected to take place in three months time.

Culture Minister Mahesh Sharma said the government had not found any evidence to support the claim.
The lawyers filed a petition in a court last year saying that the monument should be handed over to Hindus.
The Taj Mahal, a 17th Century mausoleum built by Mughal emperor Shah Jahan, a Muslim, after his wife's death, attracts about 12,000 visitors a day.
Six lawyers belonging to the city of Agra, where the monument is located, had told a court there was "substantial evidence" to prove that the famous monument was originally a temple dedicated to the Hindu god Shiva.
They had urged the court to declare the monument a Hindu temple.
The Taj Mahal was completed by Shah Jahan in 1653 as a mausoleum for his third and favourite wife, Mumtaz Mahal, who died giving birth to their 14th child.
The monument's complex structure of white marble domes and minarets inlaid with semi-precious stones and carvings is considered the finest example of Mughal art in India.
In 1983, the Taj Mahal became a Unesco World Heritage site and attracts millions of visitors each year.
The world's first successful penis transplant has been reported by a surgical team in South Africa.
[NEXT_CONCEPT]
India's government has rejected claims by a group of lawyers that the Taj Mahal monument was a Hindu temple.