Health officials said 111 children have died at the state-run Sri Krishna Medical College and Hospital, and another 20 at the Kejriwal hospital, which is run by a private trust.
Muzaffarpur's chief magistrate ordered an investigation into possible negligence by federal health minister Harsh Vardhan, as well as Bihar's health minister.
Social activist Tamanna Hashmi - who filed a complaint at the court - confirmed that the investigation had been ordered.
In New Delhi, the Supreme Court also ordered Bihar's government to report on "medical facilities, nutrition, sanitation and hygiene conditions" in the state, the Press Trust of India news agency reported.
Lawyers for the Bihar government told the court that the crisis was now under control.
More than 1,350 children have died from the syndrome in the past decade, including 355 in 2014.
AES is an inflammation of the brain, affecting mostly undernourished children under 10.
The precise causes of the syndrome are not known, but experts say a toxin in unripe lychee fruit - which is grown abundantly in Muzaffarpur - causes blood sugar levels to plummet in malnourished children, affecting the brain.
Symptoms include high fever, vomiting and seizures.
Experts say the deaths could be avoided if people had awareness and access to better health care and nourishment.
Bihar is one of India's poorest states. The National Family Health Survey states almost half of the children under five in the Muzaffarpur are stunted, almost 60 per cent are anaemic, and more than 40 per cent underweight.