Erectile dysfunction (ED) is a major complication of diabetes mellitus (DM). This study investigates the relationship between ED and the downregulation of constitutive nitric oxide synthase (cNOS) in the corpus cavernosum (CC) of diabetic rats. It also examines the effects of udenafil, a phosphodiesterase type 5 (PDE5) inhibitor, on ED and cNOS expression levels. After 16 weeks of daily oral treatment with udenafil in diabetic rats, the intracavernous pressure/mean arterial pressure (ICP/MAP) ratio was recorded to measure erectile function, and cNOS expression was measured using reverse transcriptase (RT)-PCR and immunoblots. Although the ICP/MAP ratio and the expression levels of endothelial NOS (eNOS) and neuronal NOS (nNOS) in the CC were markedly decreased in diabetic rats, long-term udenafil treatment improved the erectile function and increased cNOS expression compared with diabetic controls. These findings suggest that ED in DM is closely related to decreased cNOS expression in the CC and that udenafil has the ability to compensate for this pathological change by modulating cNOS expression. Udenafil also has an inhibitory role in cGMP (cyclic guanosine monophosphate) degradation.