Surgeons at Kaohsiung Chang Gung Memorial Hospital, in south-western Taiwan, found the cancer had spread too far and decided to amputate part of it.
The man is now recovering from the agonising operation, and will begin courses of chemotherapy as soon as he is deemed fit enough.
Dr Wang Hung-jen, head of the hospital's urology department, said the cancer had obstructed the blood vessels in the man's penis.
What caused it?
He also revealed that doctors had spotted early stages of cancer in the man in 2014, and advised him to have his bladder surgically removed.
'But the patient refused because he didn't want to wear a urine bag for the rest of his life,' Dr Wang told local reporters.
He led the operation on the unnamed man and cut into both his penis and bladder to try and relieve some of the pain.
On whether his patient was likely ever to have sex again, Dr Wang said: "He isn't married and didn't request an evaluation of potential sexual function.
The dangers of priapism
An erection that lasts any longer than four hours, medically known as priapism, is deemed a medical emergency.
In such cases, erections don't subside after ejaculation and aren't always triggered by sexual stimulation, the NHS states.
The painful condition, considered rare, can be triggered by anything that disrupts the flow of blood out of the penis - as well as some forms of cancer.
Doctors usually recommend the gruesome tactic of using a needle and syringe to drain blood out of the penis for patients.