Background: Exclusive breastfeeding (EBF), especially during the first six months of life, is one of the primary health indicators in infants. Objectives: The present study intended to describe the frequency of EBF in infants and its determinants until six months after birth. Methods: This longitudinal study was conducted on 673 mother-newborn pairs visiting obstetrics and gynecology departments of two main hospitals in Zanjan. Information on the frequency of EBF up to six months, socio-demographic and reproductive information, and attitudes of mothers towards breastfeeding was gathered using questionnaires. Data were analyzed using chi-square test and logistic regression in SPSS. Results: The proportion of neonates who were receiving EBF at discharge was 95.7%. The EBF proportions in the second week, the first, fourth, and sixth months were 95%, 88.1%, 80.7%, and 77.3%, respectively. The multivariate analysis of data indicated that living in urban areas (P = 0.02), lower education of mothers (P = 0.008), having more than three years of birth interval (P = 0.006), no experience of breastfeeding in mothers (P = 0.01), no prior decision for breastfeeding in mothers (P < 0.0001), and use of artificial nipples (P = < 0.0001) were independently associated with non-EBF. Conclusions: In this study, despite a high proportion of EBF at discharge, we found that the proportion of EBF reduced during six months. The determinants of non-EBF at six months, including urban and less educated mothers, highlight a need to promote awareness regarding EBF and perform interventions for women at a greater risk for early breastfeeding cessation.