The anonymous man was told that the pain in his stomach was coming from an ovarian cyst.
He has since been diagnosed with two rare genetic conditions, one of which increased his male hormones and led him being able to grow a beard and have a 'micropenis'.
The patient had grown up an orphan and was presumed to be male.
He stopped growing after puberty at the age of 10 and was just 4ft 6in tall.
Researchers in Hong Kong said: "Were it not for the cyst, his medical condition might never have been exposed."
The unusual situation was reported in the Hong Kong Medical Journal, which says only six cases have ever been previously reported.
The man says he will continue to "perceive himself as having a male gender" but will possibly look into testosterone replacement.
Read more: "I want to help other rape victims"
Read more: Chester, the painting dog!