The morbidity of children under five years due to diarrhea is very prevalent in Nairobi County. Mathematical models can be used to study the dynamics of infections and suggest possible control strategies in the process. In this study, a deterministic model has been developed to investigate the impact of hygiene and treatment as control strategies, on the dynamics of diarrhea in children under five years of age in Nairobi County. In the analysis of the model, it was shown that the disease‐free equilibrium of the model was locally and globally asymptotically stable if the effective reproduction number was less than unity, while the endemic equilibrium point was locally and globally asymptotically stable if the effective reproduction number was greater than unity. From the sensitivity analysis of the effective reproduction number, it was observed that the sensitivity indices of the effective contact rate, the fraction of children joining the infected classes and modification parameters, are positive, while the indices of the rate of being born five years ago, hygiene compliance, natural death rate, rate of gaining symptoms, death rates due to diarrhea, treatment rates for infected children, recovery rates for treated children, and discharge rate are negative. From scenario simulations of the model, it was observed that when hygiene compliance strategy is increased, the disease is decreased and when it is equal to one, that is, when it is fully embraced, the disease is completely eradicated. It was observed that by increasing the treatment rate for mildly infected and treatment rate for severely infected children, the disease is controlled. It was lastly found that by increasing both the treatment rate for mildly infected children and hygiene compliance, the disease dies out and by increasing both the treatment rate for severely infected children and hygiene compliance, the disease is also eradicated completely. From the results, it was noted that by increasing hygiene compliance, the disease is completely wiped out as compared to treatment. It was also noted that for the two strategies combined, the disease is wiped out after 20 days if increased, while for the hygiene compliance strategy alone, the disease is wiped out after 40 days if fully embraced. Thus, it was concluded that both hygiene compliance and treatment are the best control strategies if fully embraced for the complete eradication of the disease within a shorter period of time.