The cause of azoospermia may be some type of obstruction that prevents sperm from leaving the body. Or it can stem from a problem with sperm production due to genetic factors, an infection of the testicles or prostate, trauma (such as an earlier injury to the spine, pelvis, stomach or male sex organs or surgery to repair an inguinal hernia). Another possibility is a varicocele, an abnormal enlargement of the vein in the scrotum that drains the testicles.
Non-obstructive causes of azoospermia include drugs used to treat inflammation or cancer, steroids and antibiotics. Smoking, drinking alcohol, and using recreational drugs can also impair sperm production. Other possible causes could be deficient levels of hormones produced by the testes, radiation treatments for cancer, and retrograde ejaculation, in which semen travels into the bladder instead of out the urethra (usually associated with a problem in the neck of the bladder, caused by spinal cord injuries, drugs or Diabetes). Exposure to pesticides, heavy metals, and heat can also lead to azoospermia, as can undescended testicles.