BackgroundThere is an increasing recognition that children remain at elevated risk of death following discharge from health facilities in resource-poor settings. Diarrhea has previously been highlighted as a risk factor for post-discharge mortality.MethodsA retrospective cohort study was conducted to estimate the incidence and demographic, clinical, and biochemical features associated with inpatient and 1-year post-discharge mortality amongst children aged 2–59 months admitted with diarrhea from 2007 to 2015 at Kilifi County Hospital and who were residents of Kilifi Health and Demographic Surveillance System (KHDSS). Log-binomial regression was used to identify risk factors for inpatient mortality. Time at risk was from the date of discharge to the date of death, out-migration, or 365 days later. Post-discharge mortality rate was computed per 1000 child-years of observation, and Cox proportion regression used to identify risk factors for mortality.ResultsTwo thousand six hundred twenty-six child KHDSS residents were admitted with diarrhea, median age 13 (IQR 8–21) months, of which 415 (16%) were severely malnourished and 130 (5.0%) had a positive HIV test. One hundred twenty-one (4.6%) died in the hospital, and of 2505 children discharged alive, 49 (2.1%) died after discharge: 21.4 (95% CI 16.1–28.3) deaths per 1000 child-years. Admission with signs of both diarrhea and severe pneumonia or severe pneumonia alone had a higher risk of both inpatient and post-discharge mortality than admission for diarrhea alone. There was no significant difference in inpatient and post-discharge mortality between children admitted with diarrhea alone and those with other diagnoses excluding severe pneumonia. HIV, low mid-upper arm circumference (MUAC), and bacteremia were associated with both inpatient and post-discharge mortality. Signs of circulatory impairment, sepsis, and abnormal electrolytes were associated with inpatient but not post-discharge mortality. Prior admission and lower chest wall indrawing were associated with post-discharge mortality but not inpatient mortality. Age, stuntedness, and persistent or bloody diarrhea were not associated with mortality before or after discharge.ConclusionsOur results accentuate the need for research to improve the uptake and outcomes of services for malnutrition and HIV as well as to elucidate causal pathways and test interventions to mitigate these risks.Electronic supplementary materialThe online version of this article (10.1186/s12916-019-1258-0) contains supplementary material, which is available to authorized users.