Merced Police say 22-year-old Ahmad Baig of Merced was walking along the tracks near 24th and P Streets with two friends when he was struck.
The train's conductor said they blew the horn on the train continuously trying to warn them but they continued to walk on the tracks.
As the train got closer, the three tried to jump off the tracks but Baig was unable to make it off in time. He was taken to a hospital via helicopter but is expected to survive.
Police say he and his friends will likely face trespassing charges.