The accident happened Friday morning near the Metra station in Norwood Park along Northwest Highway.
Erik Lucansky was apparently listening to music on his way to school when he walked into the path of an outbound train. Paramedics say the 17-year-old likely had his earphones on and may not have heard the Metra train.
Lucansky was struck by train No. 605 near the Norwood Park station at 6088 N. Northwest Hwy. about 6:50 a.m., according to Metra officials and the Cook County Medical Examiner's office.
The victim was walking to Taft High School, which is about half a block away from where he was hit. His young niece was apparently following behind him at a distance, and fire officials say the accident unfolded in front of her, but she was not injured.
Lucansky's niece called his mother and she was able to quickly arrive at the scene.
Lucansky was taken to Advocate Lutheran General Hospital in Park Ridge, where he died at 7:27 a.m., according to the medical examiner's office.
Trains were stopped for about 45 minutes in the heart of rush hour, according to Metra's website. Service resumed about 7:35 a.m.
"He was a great friend of mine," said Ivan Gutierrez. "I've known him for a long time and I just can't believe what happened this morning."
On its web site, the school stated: "It is with heavy hearts that we must inform the Taft community of the passing of one of our students. Erik Lucansky was tragically struck by a train and killed while crossing the tracks at Bryn Mawr and Avondale on his way to school. Please join us in offering Erik's family our deepest sympathy in this time of sorrow."
Metra officials and police are investigating.
Sun-Times Media Wire contributed to this story.