Smoking a lot, drinking too much alcohol, and using drugs like cocaine and ecstasy during pregnancy can all increase your risk for miscarriage. And some studies show an association between drinking four or more cups of coffee a day and a higher risk of miscarriage.