Gym trainer T Siva ignored warnings from a person nearby and the train driver while filming near Borabanda railway station on 21 January.
Mr Siva survived but has suffered head injuries, according to South Central Railways Police.
He has appeared in court and been fined 500 rupees ($7.87, £5.50).
The 21-second-long video was shared thousands of times on Facebook on Wednesday. In it, Mr Siva is seen standing in the foreground as an MMTS train approaches.
There is an audible warning from a person nearby and a repeated horn blaring from the train. Mr Siva does not move and continues filming, saying "one minute".
The train strikes him on the right side of his head and body and the phone falls to the ground.
Taking a video while standing in front of a fast-approaching train is a deadly trend in India.
In October 2017 three teenagers were run over by a train while trying to take a selfie in Karnataka state, and two teenagers were killed while taking selfies on railway tracks in Delhi.
Experts say youngsters obsessed with social media are going to extreme lengths in the quest for reckless selfies. Many cases involve young men.
The majority of selfie deaths across the world have taken place in India: Of the 127 global selfie deaths researchers identified between March 2014 and September 2016, 76 occurred in India and most of the victims were reported to be young people, according to US PhD student Hemank Lamba and his team at Carnegie Mellon University in Pittsburgh.
In India, most selfie deaths are related to trains, which Mr Lamba said was due to "the belief that posing on or next to train tracks with their best friend is regarded as romantic and a sign of never-ending friendship."
Many people on Twitter sharing the video have called Mr Siva's actions "shocking," "crazy," or "risky".
"The person persisted with his attempt to take a selfie, due to which he was hit by the speeding MMTS train and fell down by the side of the track and sustained a head injury," a spokesperson for South Central Railway of India told the BBC.
"The person was also booked under the Railways Act by the Railway Protection Force. Any act of taking selfies and photographs by trespassing on the railway tracks and premises and on trains will entail punishment under section 147 of the Railways Act, 1989."