Objective: To investigate the repercussions of COVID-19 on the length of breastfeeding and analyze the associated factors in Belo Horizonte, Minas Gerais, Brazil. Method: This is an epidemiological, prospective cohort study. Data were collected from medical records and through telephone interviews. Women who weaned were estimated using Kaplan-Meier survival analysis. The log-rank test was used to verify differences between groups, analyzing weaning time, according to sociodemographic and clinical characteristics. The values of hazard ratio and 95% confidence intervals were estimated using Cox regression analysis. Results: A total of 1,729 women participated in the study. During the COVID-19 pandemic, brown women and women undergoing cesarean section were more likely to stop breastfeeding. Conclusion: The birth route and mothers’ ethnic characteristics were associated with early weaning during the COVID-19 pandemic. Such findings are important to guide the assistance of the multidisciplinary team, especially nursing, during the post-pandemic period and in future epidemiological scenarios.