Erectile dysfunction (ED) is the most prevalent consequences in men with diabetes mellitus (DM). Recent studies demonstrates that neutrophil extracellular traps (NETs) play important roles in DM and its complications. Nevertheless, whether NETs are involved in ED remains unknown. This work intended to explore the role and mechanisms of NETs in ED in the context of DM. Here, we observed that NET generation and pyroptosis were promoted in DM rats with ED compared with controls. Mechanistically, NETs facilitated NLRP3 inflammasome activation and subsequently triggered pyroptosis under high glucose stress, ultimately leading to ED. Intriguingly, DNase I (a NET degrading agent) alleviated ED and corpus cavernosum injury in DM rats. Overall, NETs might induce ED in DM by promoting NLRP3-mediated pyroptosis in the corpus cavernosum.