The dog, named Tie by MTA workers for all the railroad ties she ran across, is being cared for by Animal Care & Control and will be up for adoption unless her owner is found.
The MTA says the brown and black pup started running next to the train as it moved out of Mott Haven Junction en route to Grand Central shortly before 11 a.m.
Engineer Joseph Delia, a dog lover, told the New York Post he slowed the train down to a crawl to avoid hitting the dog, who at one point got ahead of the lead car and twice fell between the track ties.
"She's not a very big dog. I was worried she wouldn't make it and get electrocuted," Delia told the Post.
The pup made it safely to the 125th Street station in Harlem, where two MTA police officers and a station worker made their way toward the tracks to corral her. Instead, she ran toward them.
Passengers cheered as emergency service officers evaluated the dog and put her into a patrol car, the Post said.
Tie had a limp and was nursing her right front paw, but was wagging her tail and seemed in good spirits, says Luis Alvarez, one of the MTA police officers who helped rescue her. He has a dog, and says he could tell she was a very friendly pooch.