Some medicines lower the amount of sperm made by the body. This can cause infertility. Some examples are:  Cancer medicines, like chemotherapy. Certain anti-fungal medications. Long-term anabolic steroid use. Some ulcer drugs. Testosterone replacement therapy.