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 died on the spot, while Suraj was now fighting for his life in NRS Medical College and Hospital, railway sources said.
Rakesh hailed from Bihar, and used to stay at Anandanagar near Kalyani.