The explosion took place at the railway track near Barma Hotel close to Saryab Road in Quetta.
Railway officials said that the explosion damaged the track of some three feet area, suspending the train service.
The victims were identified as Sher Zaman and Abdul Muslim.
Rescue teams have been called on the spot and relief operation was in progress.
Security force rushed to the spot and cordoned off the area to probe the incident.
No one has yet claimed the responsibility of the blast.
It is pertinent to mention here that various Baloch nationalist groups were have claimed responsibilities of such kind of attacks in the past.