Lewis Medina said he saw the car stuck on the tracks about 8:30 p.m., at the BNSF Railroad Barnes Road crossing, just north of Prairie Street.
Medina left his vehicle on the side of the road and went to check on the driver, a 72-year-old who was apparently suffering from a diabetic issue and was unable to move.
As Medina called 911, he looked down the tracks and saw a train was coming.
WATCH: Bystanders carry 97-year-old woman out of burning home on chair
"I unbuckled his seatbelt, and I grabbed him like a bear hug and when I pulled up on him, his arms just slipped right from underneath me, like it was dead weight," Medina said. "And then I hear the train horn blow, so now I'm really panicking. So I decided to grab him by his shirt and his pants leg and pull him out of the vehicle, and right when I got him at the bottom of the hill, the train came and smashed the car."
Medina stayed with the driver until Kane County Sheriff's deputies arrived to help.
"Every day, we see the people of Kane County doing charitable and even courageous things for one another. It is no surprise that one of our own sprang into action just in time to save another," Kane County Sheriff Ron Hain said in a statement.
The sheriff's office said the driver, who is from Aurora, had turned west from Barnes onto the railroad tracks and driven down the tracks with the vehicle's wheels on the outside of the rails before the vehicle became stuck on top of the tracks.
Authorities said the driver is now doing well.