Background There are very few studies assessing the association between a COVID-19 infection and the rates of exclusive breastfeeding (EBF) upon discharge following the first waves of the pandemic and after the initiation of vaccination. The primary objective of this study is to compare the rates of EBF upon discharge in mothers diagnosed with a COVID-19 infection at the time of the birth versus a group of non-infected mothers in maternity hospitals with Baby Friendly Hospital Initiative (BFHI) accreditation. The secondary objectives include determining the rates of BF at 3 and 6 months of life in both groups, as well as determining the possible factors involved in the rates of EBF observed upon discharge.Methods An observational, multi-center, prospective cohort study conducted from April 1, 2021 to March 31, 2022 and with follow-up during the first six months of life. Follow-up was performed via telephone contact with calls performed at three and six months. A multivariate logistic regression analysis model was performed to identify the factors related to a lower probability of EBF upon discharge.Results 308 mother-infant pairs participated in the study, 111 in the cohort of exposed patients and 197 in the cohort of non-exposed patients. Exposure to COVID-19 during the birth (AOR 5.28; 95% CI 2.01, 13.86), not practicing BF previously (AOR 36.3; 95% CI 7.02, 187.74), birth via cesarean section (AOR 5.06; 95% CI 1.62, 15.79) and the weight of the newborn (AOR 1.01; 95% CI 1.01, 1.01) were associated with a greater risk of not performing EBF upon discharge. At three months, 52.4% of exposed patients vs. 57% of non-exposed patients (p = 0.33) were performing EBF, with the rates of EBF at six months being 43% vs. 39.3% (p = 0.45) respectively.Conclusions Mothers with a mild or asymptomatic COVID-19 infection at the time of the birth had a lower probability of feeding their babies with EBF at the time of discharge from hospital in a group of BFHI-accredited hospitals.