BackgroundThe benefits of exclusive breastfeeding (EBF) have been universally documented, with evidence of positive impacts on a child’s optimal growth, development, and survival. However, EBF practices in Nepal have fluctuated and declined over the last 25 years. In addition to the individual factors of mothers and infants, EBF practices are affected by multiple community-level factors. Understanding these factors is essential for designing breastfeeding promotion programs to improve child nutritional status in Nepal. This study investigated the individual- and community-level determinants of EBF practices among young infants aged 0–5 months in Nepal.MethodWe used the dataset from the Nepal Demographic and Health Survey 2022. Information on EBF in the past 24 h was available for 540 infants aged 0–5 months. A multilevel mixed-effect logistic regression was used to identify individual- and community-level factors associated with EBF among infants aged 0–5 months in Nepal.ResultsThe 24-hour prevalence of EBF among infants aged 0–5 months was 57.46% (95% confidence interval (CI): 52.18, 62.57). The infant’s age was inversely associated with EBF prevalence at the individual level. Compared with infants aged < 1 month, infants aged three months (adjusted odds ratio (AOR): 0.14, 95% CI: 0.05, 0.40), four months (AOR: 0.11, 95% CI: 0.04, 0.28), and five months (AOR: 0.07, 95% CI: 0.03, 0.20) were less likely to receive EBF. At the community level, community-level variables such as ≥ 4 ANC visits coverage, maternal employment status, and poverty level were generated by aggregating the individual characteristics in a cluster and were categorized using quartiles into low (“< 25%”), moderate (25–75%), and high (≥ 75%). Mothers from communities with moderate ≥ 4 ANC visits (AOR: 3.30, 95% CI: 1.65, 6.57) and high ≥ 4 ANC visits (AOR: 2.70, 95% CI: 1.40, 5.22) coverage had higher odds of EBF practices than did those from communities with low ≥ 4 ANC visits coverage. Similarly, communities with moderate (AOR: 2.67, 95% CI: 1.34, 5.30) and high (AOR: 2.34, 95% CI: 1.10, 4.99) levels of maternal employment status and moderate levels of poverty (AOR: 2.20, 95% CI: 1.13, 4.28) were associated with a higher likelihood of EBF practices. Subnational level variation was evident, with infants in Lumbini province having lower odds of EBF (AOR: 0.32, 95% CI: 0.13, 0.77) relative to Koshi province. Approximately 9% of the variation in EBF practices was observed among mothers while mapping across clusters in this study.ConclusionVarious individual- and community-level factors influence the uptake of EBF in Nepal, underscoring the need to improve the approaches and strategies of EBF programs. This study highlighted the significant association of community-level factors (≥ 4 ANC visits coverage, poverty level, and maternal employment status) with EBF among infants under 6 months. It revealed approximately 9% variability in EBF across clusters. Future efforts to promote EBF should focus on older infants and communities with low poverty levels and low coverage of recommended ≥ 4 ANC visits. Furthermore, context-specific adaptation of such efforts might be required considering the variation observed between the communities in the present study.