The explosion took place as the Khushal Khan Express from Karachi to Peshawar approached the Unnar Wah railway station in Jacobabad.
"The bodies of the five dead people have been taken out from the bogies while around 30 injured have been shifted to the civil hospital in Rahimyar Khan," a rescue official said.
The powerful explosion derailed three bogies of the Express and caused damage to the tracks.
This is the second blast on a railway track in recent days as earlier this month the Shalimar Express was targeted near Dhabiji.