With the spread of COVID-19, certain population groups, including pregnant women, were more susceptible than others. This disease can lead to postpartum complications, including mental disorders, in mothers. Few studies have investigated the impact of mindfulness-based interventions on mental health, and the most effective counseling approach to promote mental health has not been identified. This study aimed to determine the impact of online mindfulness-based counseling on improving mental health among women with a history of COVID-19 during pregnancy in Iran. The present study was a quasi-experimental design conducted on 100 women with a history of coronavirus infection during pregnancy referred to the Mother's Clinic of Yahya Nejad and Ayatollah Rouhani Educational-Treatment Hospital, affiliated with Babol University of Medical Sciences, Iran, via convenience sampling. The women were randomly assigned to the intervention (mindfulness-based counseling) and control groups. The intervention group received eight 45-min weekly mindfulness-based counseling sessions over 8 weeks. Data were collected via a demographic information questionnaire and the Goldberg General Health Questionnaire before and after the intervention, which were completed by both groups. Independent t-tests and analysis of covariances (ANCOVAs) were used to compare the outcomes of the two groups. After controlling for confounding variables, the mean mental health scores before and after counseling were 29.42±4.49 and 19.80±3.88, respectively, in the intervention group and 26.26±2.29 and 25.92±2.15, respectively, in the control group. The mean mental health score in the intervention group was significantly lower than that in the control group (F=266.7, p<0.001). The mean scores for somatic symptoms (F=89.30, p<0.001), depression symptoms (F=142.71, p<0.001), anxiety and insomnia symptoms (F=120.56, p<0.001), and social dysfunction scores (F=127.77, p<0.001) were significantly different between the two groups after counseling. The findings indicated that online mindfulness-based counseling positively affects mental health and its domains during the postpartum period. However, further randomized clinical trials are needed before a definitive conclusion can be drawn. We were not allowed to register according to the law of our country.