This article aims to analyze the association between guidance on breastfeeding in primary health care and exclusive breastfeeding. It involved a cross-sectional study conducted in 2013 in the city of Rio de Janeiro, Brazil, by means of interviews with 429 mothers of infants below six months of age in primary care units. We estimated adjusted prevalence ratios by Poisson regression. In the final model, the variables associated with the outcome (p ≤ 0.05) were retained. The prevalence of exclusive breastfeeding was 50.1%. In multivariate analysis, guidance on exclusive breastfeeding in primary care was directly associated with the outcome (PR = 1.32). Maternal income < 1 minimum wage (PR = 0.77), previous breastfeeding experience for less than 6 months (PR = 0.73), not living with a partner (PR = 0.76), non-exclusive breastfeeding at discharge (PR = 0.78), alcohol consumption (OR = 0.57), guidance on pumping breast milk (PR = 0.53), pacifier use (PR = 0, 74) and baby's age in months (PR = 0.78) were associated inversely with the outcome. Guidance on exclusive breastfeeding favored it, while inadequate guidance and practices were associated with a lower prevalence of the outcome.