Having sex the night before having an abortion has an effect because abortion is a surgical procedure and having sex the night before will have bacteria in the vagina. When doing the surgery, it may cause upward infection of bacteria, leading to inflammation of the endometrium after abortion, and in serious cases, it may also cause pelvic inflammatory disease. Therefore, you should not have sex for at least three days before having an abortion because the vagina itself has a self-cleaning effect, and after having sex for three days, the abnormal bacteria in the vagina may be swallowed up by the normal bacteria in the vagina. Therefore, you can have an abortion three days after having sex. You should not have sex within one month after having an abortion, because sex can cause infection.