The prevalence of breastfeeding has increased over the past two decades in Brazil, as a result of public breastfeeding policies. The scope of this paper is to analyze the correlation between the increase in the prevalence of breastfeeding and hospitalization rates due to diarrhea. It is an epidemiological ecological study, based on secondary data from Brazilian Capital Cities and the Federal District. The prevalence of breastfeeding, the number of live births, and cases of hospitalization due to diarrhea were compared for the years 1999 and 2008 and the Spearman non-parametric test was used to correlate the variables. During the period, 1,329,618 children under one year of age in 1999 and 2008 were studied. The increase in the prevalence of exclusive breastfeeding among children under 4 months old had a negative correlation with hospitalization rates due to diarrhea (Rho=-0.483, p=0.014). This correlation was stronger for girls (Rho=-0.521, p=0.008) than for boys (Rho=-0.476, p=0.016). The increase in the prevalence of breastfeeding between 1999 and 2008 appears to be correlated to a reduction in hospitalization rates due to diarrhea over the same period, corroborating the importance of public policies to protect, support and promote breastfeeding.