Medications are the leading cause of erectile dysfunction. Some medications taken for depression or high blood pressure could cause erectile dysfunction.