Objective:To investigate the mechanism of diabetic erectile dysfunction(ED) by detecting the variation of the activity and distribution of nuclear factor-kappaB(NF-κB) in the corpus cavernosum of rats with diabetes mellitus. Methods:All of 40 male Sprague-Dawley rats were divided into 3 groups:control group(group A, n = 10), diabetic group for 4 weeks(group B, n = 14), and diabetic group for 12 weeks(group C, n = 16). The diabetes model was established by the injection of STZ. After some weeks erection function was examined by apomorphine injection. The content of NF-κB in the erectile tissue was evaluated by immunohistochemistry staining. At the same time the activity of NF-κB was detected by electrophoretic mobility shift assay(EMSA). Results:Compared with those in group A,erection function was down-modulated significantly, and the activity of NF-κB in penile tissues was higher in group B and group C(P < 0.05). And the expression of NF-κB had an increasing tendency with the extension of the disease course. NF-κB was mainly expressed in the endothelial cell of the corpus cavernosum, however less in contractile fiber cells and other cells. Conclusion:The activity and distribution of NF-κB in the corpus cavernosum of diabetic rats has been shown to be altered with diabetes. NF-κB might play an important role in the develoment of diabetic ED.