The bloody disaster occurred when the Patna-bound train's coaches ran off the rails shortly after 3 a.m. near Pukhrayan station, about 60 km from Kanpur city, railway and police officials said.
It was not clear what caused the tragedy. Minister of State for Railways Manoj Sinha said the track may have developed cracks.
The Kanpur District Magistrate told IANS that 104 people have died so far and 75 still admitted to various nearby hospitals were being shifted to Kanpur. All others had been given first aid and discharged.
The deaths in nthe train derailment could rise as some passengers were in a critical condition.
Panic set in when the coaches derailed in darkness, throwing scores of seelping passengers over one another. Many took a while to realise that a tragedy had hit the train.
Passengers who survived related that there was screaming and shouting as many of the injured were in agony.
The worst hit were the sleeper coaches S1, S2, S3 and S4.
A passenger who survived told journalists that the train stopped a couple of moments after 3 a.m. for unexplained reasons.
"It then suddenly picked up speed," the man said. "And then I got an eerie feeling that the train was rolling down a valley," he said.
"By the time I leant what had happened, some 20-25 people in my coach had been killed. A six-year-old girl was literally cut into two pieces," said the terrified man.
Swayambi Mishra, in her early 20s, said she was in S1 and she did not know what had happened to her father.
A passenger in his 60s added: "God saved me. But most of the people who were with me in the coach seem to have disappeared. I can't find them."
It was the worst train accident in the country after the May 2010 disaster in West Bengal involving Gyaneshwari Express that killed some 170 people.
Relief officials described gory scenes, with many passengers crushed by tonnes of steel as some coaches rolled over. Gas cutters were used to rip through the coaches to take out the bodies and the wounded.
Hundreds of bags and suitcases belonging to the passengers were strewn all along the rail track.
National Disaster Response Force (NDRF) spokesperson Krishna Kumar told IANS: "Most bodies are beyond recognition as they are badly crushed."
Ruby Gupta, who was going from Indore to Mhow to attend a wedding, could not find her father after the accident. "Some people are telling me to look for him in the hospital. I need my father back."
Said another dazed survivor: "I was awake when the train derailed. There was a loud noise and then pandemonium broke out. I thought I was dreaming. My wife and children are fortunately safe..."
Survivors said the first to reach the semi-rural site were villagers.
An Uttar Pradesh constable rescued five people from S1 coach. "I felt bad I had to walk over some bodies but I had no choice as I had to save those who were alive."
Vice President Hamid Ansari and Prime Minister Narendra Modi led the nation in mourning the dead. Modi announced ex gratia of Rs 2 lakh for the next of kin of those killed and Rs 50,000 for the seriously injured.
Railway Minister Suresh Prabhu and the governments of Uttar Pradesh and Madhya Pradesh also announced financial compensation.
The railways used heavy machinery to separate the tangled coaches. NDRF personnel used hammers to smash the windowpanes to enter the air-conditioned coaches as most doors were locked from inside.
A railway official in Indore said the train, which left on Saturday and would have reached Patna on Sunday evening, was carrying 1,266 passengers, including 308 in air-conditioned coaches.
Minister Prabhu ordered an inquiry and vowed to take "strictest possible action" against the guilty. Kanpur MP and senior BJP leader Murli Manohar Joshi suspected foul play.
Later, a special train left from the accident site for Patna with the passengers who survived the disaster and could travel.
In the hospitals, the wounded remained, frightened by what had happened. Some families got separated as relief officials, unknowingly, rushed a few from a family to one hospital and others to another.