Researchers looked at over 20,000 men who underwent semen analysis as part of infertility treatment between 1996 and 2011. They were compared to a control group with the same number of men known to be fertile.
Overall, 421 cases of cancer were diagnosed. The most common cancers were melanoma skin cancer, testicular and prostate cancers.
The subfertile men – those who sought infertility treatment – were three times more likely to develop testicular cancer than those in the control group, the study found. The risk was 10 times higher in those with an abnormally low sperm count.
Other types of sperm problems also increased the risk, the University of Utah researchers said in the journal Fertility and Sterility.
However, the study doesn't establish a direct cause-and-effect relationship, so men with fertility problems shouldn't panic.
Contrary to previous studies, the researchers found no increased cancer risk in men with no sperm in their semen, they said in a journal news release.
Also, the investigators detected no link between fertility and prostate cancer risk.
"This study provides new insights that will help us deliver better patient care and provides a strong foundation for the research needed to identify, and ultimately address, underlying physiologic problems that may lead to infertility or cancer," Dr Robert Oates, a past president of the Society for Male Reproduction and Urology, said in the news release.