Though prostate cancer is not a cause of erectile dysfunction, treatments for the disease can cause the problem. Among them: Surgery to remove the entire prostate gland. Radiation therapy, whether by external beam or radioactive seed implants.