Rakesh Triguna, 23, and class nine student Suraj Mondal wanted to take the selfie about 1.5 kilometers from Kalyani station and upload it on social media.
They positioned themselves on the edge of the railway track with the Krishnanagar local just behind them.
But as they were clicking the selfie, the fast moving train rammed into them, said eye-witnesses.
Rakesh hailed from Bihar, and used to stay at Anandanagar near Kalyani.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.