Despite the adverse effects of self-medication (SM), such as antimicrobial drug resistance, drug addiction, allergy, worsening of ailment, organ damage, disability, and death, the practice is still common and increasingly practiced globally, even among pregnant women. This study investigated the prevalence and factors influencing self-medication among pregnant women attending antenatal clinics in urban tertiary hospitals in Nigeria. A facility-based cross-sectional study was carried out in two tertiary hospitals in Port Harcourt between 25 September and 24 October 2022, using an interviewer-administered questionnaire. Data were analyzed using descriptive and logistics regression techniques, and statistical significance was set at p secondary level (AOR = 0.31, 95% CI = 0.18–0.51). This study showed that a significant proportion of pregnant women practiced SM and marital status and educational level were the factors influencing SM in the studied population. We recommend public health education and reproductive health programmes aimed at discouraging unmarried women and those with minimal education from the irrational use of drugs during pregnancy.