Are antibiotics to blame for your erectile dysfunction? Here’s what you need to know about antibiotics, ED, and other drugs affecting men’s health.

Antibiotics have saved countless lives and are needed to treat many different infections. When you’re taking antibiotics, if you’re experiencing erection problems, you may be wondering, “Do antibiotics cause erectile dysfunction?” Let’s dive deeper into the answer to that question.

Is There Evidence That Antibiotics Cause Erectile Dysfunction?

First, there are no studies that we can find that investigated whether antibiotics cause erectile dysfunction. It’s not listed as a side effect of these medications.

If you’re suffering from ED while on antibiotics, it may be that the infection itself is causing sexual dysfunction. When battling an infection, your energy levels may not be high enough to sustain a strong enough erection for sex.

Having said that, there is a way in which antibiotic medications could conceivably affect sexual function. 

Your Microbiota and Erectile Dysfunction

Scientists are finding out more and more about the organisms that live in your gut and other areas of your body. These organisms include bacteria—both good and bad—as well as fungi and viruses. Scientists call this collection of organisms the microbiota. 

What does this have to do with healthy erections? Believe it or not, plenty. 

It’s important that the microbiota be balanced. If the bad bacteria in your microbiota outnumber the good bacteria, it can cause problems throughout the body. In technical terms, this imbalance is known as microbiota dysbiosis. When it occurs, it can lead to problems like irritable bowel syndrome, diabetes, obesity, and cardiovascular concerns.1 It can even affect your memory and brain function. 

Scientists now suspect that an imbalance in the microbiota could also be tied to erectile dysfunction. According to research, men with ED have a lower diversity of gut microbiota compared to men without ED. It’s to your advantage to have high microbiota diversity, while lower levels can be harmful.  

Although it seems surprising that the gut could have anything to do with erectile dysfunction, there are reasons why there’s a connection. First, the gut microbiota can control testosterone levels.1 Testosterone is a hormone connected to libido, sexual arousal, sexual desire, and sexual function. 

Having a healthy gut microbiota can also soothe inflammation throughout the body. Inflammation can play a role in erectile dysfunction. Men with erectile dysfunction have higher levels of the inflammatory streptococci bacteria and lower levels of the anti-inflammatory group of bacteria known as Roseburia.

In addition, imbalances in the gut microbiota are a risk factor for obesity, a condition tied to erectile dysfunction. Imbalances in the gut microbiota are tied to a number of diseases also linked to erectile dysfunction, such as cardiovascular disease, high blood pressure, and diabetes. 

The Gut Microbiota, Antibiotics, and ED 

Many factors can cause your microbiota to become imbalanced, including ongoing stress and an unhealthy diet. Antibiotic medications can imbalance your microbiota by killing off both the bad bacteria and the good organisms. 

Sometimes, antibiotics can actually improve sexual function by getting rid of the bad bacteria that’s causing an infection. 

One example is the case study of a young man suffering from an infection with the bacteria Bartonella henselae, commonly known as cat scratch disease. At the same time, he developed erectile dysfunction. After he was treated with 100 mg of tetracycline (doxycycline) twice a day for 3 weeks, his ED went away.

Problems might happen if by killing the good bacteria, antibiotic use—especially prolonged use—stops the good bacteria from growing, allowing the bad bacteria to take over.

While you’re taking the prescribed dose of antibiotics and after you’re done, it’s a good idea to take a probiotic supplement to replenish the good bacteria. According to one group of researchers, “It can be observed that using probiotics to regulate human microbiota is another method to improve sexual ability.”

If the Problem Persists After Taking Antibiotics

If your ED hangs around after you’re done with your antibiotic course, make an appointment with your healthcare provider. They can find out your medical history and diagnose possible health conditions and underlying causes for your erection problems. 

Heart disease, high blood pressure, diabetes, obesity, and psychological conditions are all potential causes of ED and sexual dysfunction. Work with your healthcare provider to treat these conditions.

Other Medications That Cause ED

Well-known complications of certain medications include ED. These include prescription drugs and over-the-counter drugs, which are more likely to cause sexual side effects compared with antibiotics. Drugs that may cause ED are:

High Blood Pressure Drugs

Certain blood pressure drugs can cause erectile dysfunction in some men. High blood pressure itself can cause ED by narrowing blood vessels and limiting blood flow to the penis. Although blood pressure drugs lower high blood pressure, in doing so, they also decrease the flow of blood to the penis, possibly causing erectile dysfunction.

Certain blood pressure medications are the worst offenders. These include thiazide diuretics, loop diuretics, and beta-blockers, although they don’t cause ED in all men.6 

Other types of blood pressure medications like alpha-blockers and ACE inhibitors used to treat hypertension rarely cause ED.6 A type of blood pressure medications called angiotensin receptor blockers may improve erectile function.   

Some research suggests that the sexual side effects that can happen with beta-blockers might be psychological. A study published in the European Heart Journal investigated men who did not have ED who started taking the beta-blocker atenolol.

Some of the men were told that a side effect of the drug is ED while other men in the study were not told about the drug’s possible side effect or its name. Almost one-third of the men who were told that atenolol might cause ED experienced sexual dysfunction. In the men who were not told the drug’s name or its sexual side effect, only 3% suffered from ED.  

Anti-Anxiety Drugs and Antidepressants

Prescription drugs like anti-anxiety drugs and antidepressants can cause ED. Anti-anxiety medications like Ativan, Xanax, and Valium may cause ED by interfering with nerve impulses that trigger erections. They may also affect hormones in the body.  

Some antidepressant medications like selective serotonin reuptake inhibitors (SSRIs) can mess with serotonin levels, which in turn has a snowball effect that impacts other hormones important for sexual function like testosterone, as well as the brain chemical dopamine, which plays a role in orgasms. Antidepressant drugs like SSRIs can also cause low sex drive. 

Of course, being depressed itself isn’t good for erectile function, so in many cases improving your depression can lead to reduced ED. If you suspect your ED is related to your antidepressant or anti-anxiety medications, be sure to consult with your healthcare provider about changing the dosage or prescribing a different medication.  

Antiepileptic Drugs

Sexual dysfunction is a common occurrence in men with epilepsy and some anticonvulsant drugs make the problem worse. One study found that epilepsy patients taking sodium valproate, an anticonvulsant drug, had the weakest sexual function compared to men taking two other types of anticonvulsant drugs (carbamazepine and levetiracetam.) 

Other studies have found that carbamazepine and sodium valproate can cause sexual dysfunction by affecting the hypothalamic–pituitary–adrenal (HPA) axis,10 a system in your body that helps you cope with stress.   


Opioids are a prescription medication, but they are one of the most frequently abused drugs. They’re powerful narcotic medications used to treat pain and one of their most common side effects is ED.. 

Many of these drugs may lead to erection problems, although some research now indicates the mechanism may not involve lowering testosterone levels.11 Scientists aren’t exactly sure why opioids can cause ED, but one reason may be that they either cause or worsen depression or other mental health issues associated with ED.

In regards to ED, opioids that are the worst offenders include:

  • Methadone
  • Oxycontin (oxycodone)
  • Morphine
  • Fentanyl
  • Demerol

Other Prescription Medications

Other common medications that may lead to ED include:

  • Muscle relaxants
  • Parkinson’s disease drugs
  • Prostate cancer drugs, which block testosterone activity or lower testosterone

Over-The-Counter Drugs

As far as sexual side effects, the two most common drugs that are used over the counter are antihistamines for allergic reactions and H2 blockers that act as antacids. Because histamine promotes the relaxation of smooth muscles, like those that allow the blood vessels leading to the penis to fill with blood, blocking histamine can lead to trouble having an erection.   

Recreational Drugs

Recreational drug use can lead to increased risk of poor sexual performance. This includes both legal and illegal recreational drugs. There are several ways in which these types of drugs affect erections. Some block the messages that the brain is sending to trigger erections while others can cause narrowing of blood vessels that affects blood circulation to the penis. 

Recreational drugs that are most likely to cause ED include:

  • Heroin
  • Cocaine
  • Barbiturates
  • Amphetamines, including crystal meth
  • Marijuana

Remember that nicotine and alcohol are also considered recreational drugs and are often to blame for ED.

Is ED Caused By Drugs Permanent?

Most drugs don’t cause permanent ED. Once you stop taking them you improve. However, it’s best not to stop taking certain classes of drugs like those used for blood pressure until you talk with your healthcare provider. They might be able to change your dose or switch to a different med where you’re less likely to experience ED. 

Frequently Asked Questions About Antibiotics, Medications, and ED

Can Antibiotics Cause ED?

ED is not listed as a side effect of antibiotics. More than likely, if you’re experiencing ED while using antibiotics, it might be caused by the infection itself. In some cases, by clearing up the infection, antibiotics can make the ED go away, too.
However, antibiotic use, especially over the long-term, can kill off too many of the good bacteria that live in your gut and throughout your body. Imbalances in your microbiota—both the good and the bad bacteria living in your body—are linked to erectile dysfunction.
Talk to your healthcare provider if the ED continues when you’re done with your antibiotic course. 

What Prescription Drugs Can Cause Erectile Dysfunction?

Many medications have ED as a side effect. Drugs to treat high blood pressure, especially beta-blockers and diuretics (also called water pills), may cause ED in some men.

Anti-anxiety meds and antidepressants can also lead to ED. Some antidepressants can lower levels of testosterone, a hormone important for sex drive and sexual function, and dopamine, a brain chemical involved in orgasms. 

Other medications, both prescription and over-the-counter, that can cause ED include:

Antiepileptic drugs
Prostate cancer drugs
Parkinson’s disease drugs
Muscle relaxants
H2 blockers

Can Opioid Drugs Cause ED?

Opioids are powerful painkillers and a common cause of ED. It’s unclear whether the increased ED comes from increased depression triggered by the opioids or from some other factor directly related to the opioids themselves. The following opioids come with an increased risk for ED:

Oxycontin (oxycodone)

Categorized in:

Erectile Dysfunction,

Last Update: 12 May 2024