The remote-controlled blast took place when Jaffar Express was running on the outskirts of Quetta.
Police said the blast occurred when the improvised explosives device was detonated near the railway track in Dasht area when the Quetta-Rawalpindi Jaffar Express was passing through.
"The IED was around eight kilogrammes and caused damage to the train as a result of which four people have been killed while the injured have been rushed to the Civil hospital in Quetta," Home Minister Mir Sarfaraz Bugti told reporters.
There has been no immediate claim of responsibility but attacks on passenger trains in Balochistan are frequent. Such attacks are often claimed by separatist groups targeting government and security installations and personnel.
Bugti said Mastung district was the hub of insurgent groups till the army launched an offensive.
Jaffar Express has been targeted by similar IED attacks in the past.