Perinatal depression (PND) refers to depressive symptoms that occur in women during pregnancy and/or postpartum and is a common perinatal mental health problem. It is unclear whether early breastfeeding behavior is associated with PND symptoms in China. Therefore, this study aimed to investigate the association between PND symptoms and breastfeeding patterns for infants based on a large cohort. A prospective study was conducted in a community cohort from March 2021 to December 2022. In this study, maternal depressive symptoms were assessed using the Edinburgh postnatal depression scale (EPDS). The assessments were carried out 1 week before and 1 month after delivery. The socio-demographic information of the mothers, their intention to breastfeed, and their feeding status were investigated one-on-one by the hospital's trained medical staff through self-designed questionnaires. The maternity information and physical examination results were obtained through the healthcare records of the patients. A total of 442 pregnant women were included in the study, and the total detection rate of PND was 29.41%, among which the detection rate of mild PND was 24.66%, and the detection rate of severe depression was 4.75%. About 61.99% of the mothers had exclusive breastfeeding within 1 hour after delivery, and 83.71% had exclusive breastfeeding within 24 hours after delivery. The proportion of mothers with PND symptoms and those without PND symptoms who exclusively breastfed for the first time after delivery was 71.54% and 91.67%, respectively. The median duration of exclusive breastfeeding for mothers without depressive symptoms was 3(1,5) months, while the median duration of exclusive breastfeeding for mothers with depressive symptoms was 2(1,3) months, indicating that the duration of exclusive breastfeeding for mothers without depressive symptoms was longer (P < 0.05). There was an association between perinatal depressive symptoms and exclusive breastfeeding. Addressing perinatal depressive symptoms may extend the duration of exclusive breastfeeding.