The child was travelling with her parents in a sleeper coach of the Brahmaputra Express.
The victim's family alleged that the coach was packed with passengers and their daughter was suffocated in the extreme heat.
The train was going from Dibrugarh in Assam to Delhi. The distraught family alleged that the train stopped in Allahabad outer for more than two hours, leading to further deterioration of the girl's condition.
When the train reached Allahabad, the passengers created a ruckus, after which the railway officials intervened.
The family belongs to Mughalsarai district in Uttar Pradesh.