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.
Follow NDTV for latest election news and live coverage of assembly elections 2019 in Maharashtra and Haryana.
Subscribe to our YouTube channel, like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.