Martreon Ollison, 20, and a 17-year-old boy are accused of flashing weapons and robbing a 28-year-old man who was riding a train around 3 a.m. near the 87th Street station, police said.
The pair was taken into custody minutes later by responding officers, police said.
Both suspects were charged with armed robbery with a dangerous weapon.
Ollison was also charged with aggravated robbery indicating a firearm. He faces one citation for possessing a replica firearm/pellet gun.
They are scheduled to appear in court Friday.