A police spokesman said investigators believe the men were walking along the track in a wooded sector near a railway tunnel when the incident occurred.
Jonathan Germain, a spokesman for the Therese-De Blainville police, said the deaths were confirmed at the scene.
The men were believed to be in their 20s.
The accident occurred in the mid-afternoon near the tunnel, which passes under a highway.
"We're a long way from the road here, so there were no vehicles in this sector," Germain said.
None of the train passengers were hurt.
Officials with the transit authority and Canadian Pacific, which owns the track, were summoned to the scene to start an investigation with police.
"We will try to figure out the circumstances surrounding the incident and notify the families of the victims," Germain added.