A 35-year-old man killed his wife and two minor sons with an axe in Kishanpur village.
The perpetrator, Balram Kushwaha, died by suicide shortly after by jumping in front of a train.
Local police are investigating whether a viral video of the wife dancing at a religious event served as a trigger.
The couple had a history of domestic quarrels and had recently returned home following local mediation.