Thomas Scantling was sentenced Friday for a September 2008 attack caught on security videotape. He says he was hearing voices at the time.
Security footage shows Scantling pull a hammer from a backpack and repeatedly strike 20-year-old DeWayne Taylor before pulling him from the train onto a subway platform in Philadelphia.
Moments before, Scantling had guided his 6-year-old son to an open seat.
The judge says Scantling's use of the illegal drug PCP contributed to the violence.
The 27-year-old Scantling pleaded guilty to aggravated assault and a weapons charge.