The invention provides application of an antibiotic substitute drug melatonin in preventing the infection of meningitis escherichia coli pathogens on child patients. Meningitis-type escherichia coli is separated and identified from muscovy duck cerebrospinal fluid, a meningitis model of 3-week-old ICR mice is constructed for the first time by utilizing the strain, and the successful construction of the mouse meningitis model is evaluated from the aspects of neurological symptom scoring, mortality difference statistics, the damage degree of a blood-brain barrier, expression of meningitis-related inflammatory factors and the like respectively. With antibiotics as references, the mice are treated with the melatonin and the four combined antibiotics respectively, one week later, the disease onset conditions of the meningitis mice are detected, results show that through the melatonin and the combined use of the antibiotics, the neurological symptoms of the meningitis mice can both be reduced, the survival rate of the meningitis mice is increased, integrity keeping of the blood-brain barrier is promoted by the melatonin, the invasion of inflammatory cells into the central nervous systemis reduced, the disease onset of the meningitis in the mice is prevented through the function of the brain-gut axis, and a new antibiotic substitute and treatment strategy are provided for preventingneonatal meningitis diseases.