To identify risk factors for discontinuing breastfeeding during an infant’s first year of life. A cohort study recruited mothers in a hospital in São Leopoldo, Brazil, which mainly serves the low-income population. In order to obtain socioeconomic, environmental, and behavioral information, face-to-face interviews with mothers were conducted after birth, and when their infants were 6 and 12 months old. The duration of breastfeeding was investigated at 6 and 12 months, and recorded separately for each month. Depressive symptoms were assessed using the Beck Depression Inventory. The multivariate model for predicting the discontinuation of breastfeeding, adjusted Kaplan–Meier survival curves and Cox regression were used. Of the 360 participants, 201 (55.8%) discontinued breastfeeding within the first 12 months. A multivariate Cox regression model revealed that symptoms of maternal depression (low levels: RR = 1.59, 95% CI 1.02–2.47; moderate to severe: RR = 2.03, 95% CI 1.35–3.01), bottle feeding (RR = 2.07, 95% CI 1.31–3.28) and pacifier use in the first month of life (RR = 3.12, 95% CI 2.13–4.57) were independently associated with the outcomes after adjusting for confounders. Breastfeeding cessation rates were lower for children who did not use bottle feeding or a pacifier in the first month of life and for the children whose mothers presented with minimal depression. Early pacifier use and bottle feeding must be strongly discouraged to support long-term breastfeeding. In addition, screening maternal depression at a primary care service can be a step forward in promoting a longer duration of breastfeeding.