Officials said that one train travelling in Sindh province had derailed and landed on another track. A second train packed with passengers then collided with it and overturned.
Rescue teams took the injured to nearby hospitals and it is thought that several are in a critical condition.
Pakistan has seen a string of deadly train accidents over the past years.
Between 2013 and 2019, 150 people died in such incidents, according to local media reports.
A senior official in the Ghokti district, Usman Abdullah, told Reuters news agency it was hard to know how many people were still trapped in the train.
Prime Minister Imran Khan said he was “shocked” by the accident and promised a full inquiry.
Shocked by the horrific train accident at Ghotki early this morning leaving 30 passengers dead. Have asked Railway Minister to reach site & ensure medical assistance to injured & support for families of the dead. Ordering comprehensive investigation into railway safety faultlines
— Imran Khan (@ImranKhanPTI) June 7, 2021
Footage from the site shows the wreckage of several carriages lying on their side. It is not clear what caused the derailment.
Several people are though to remain trapped. News agency AFP quoted a railway spokesperson as saying: “The site is far and that’s why we are facing some trouble in the rescue work.”
Hospitals in the area have been put on emergency alert to deal with the casualties.
The accident happened early on Monday when the Millat Express coming from Karachi derailed, falling onto another track. The Sir Syed Express coming from Rawalpindi collided with it and overturned.
Ghotki Deputy Commissioner Usman Abdullah said at least 30 people had been killed while 50 others had been injured in the incident. https://t.co/U8hhYVwlND
— Dawn.com (@dawn_com) June 7, 2021
Railway accidents are not uncommon in Pakistan, often caused by derailment and collisions at unmanned railway crossings.
Train travel is an extremely popular mode of travel in the country, especially among middle and lower income groups, with tracks spanning the length and breadth of Pakistan.
However, carriages are often overcrowded and many of the trains are in poor condition.
Last July 21 people were killed near Sheikhupura, Punjab province, when a train travelling from Karachi to Lahore hit a van carrying Sikh pilgrims.
In October 2019 a fire caused by a gas cylinder killed more than 70 passengers on a train travelling from Karachi to Rawalpindi, and another 20 people were killed in a train crash a few months earlier, in July 2019.
According to the authorities, the three major causes of train accidents in Pakistan are lack of track maintenance, signal issues and older engines.
Casualty figures are often high because trains are packed with far greater numbers of passengers than they were designed for.