Frank James, who had posted online that he was the "Prophet of Doom," appeared in Brooklyn federal court and admitted pulling the trigger on the Manhattan-bound train as it moved between stations on April 12.
James, 63, had previously vowed to fight the charges.
James pleaded guilty to all 11 counts in his indictment, including 10 counts of committing a terrorist attack against a mass transit system — one for each wounded passenger.
He didn’t have a plea agreement, and prosecutors are seeking to put him in prison for decades.
According to prosecutors, James set off a pair of smoke grenades and fired a barrage of random shots inside the train, bloodying passengers as it moved between stations in Brooklyn’s Sunset Park neighborhood.
Dressed as a maintenance worker, James then fled in the haze and confusion, setting off a 30-hour citywide manhunt that ended when he called the police on himself.
Before the shooting, James, who is Black, posted dozens of videos online in which he ranted about race, violence and his struggles with mental illness, sometimes adopting the moniker "Prophet of Doom."
He decried the treatment of Black people and talked about how he was so frustrated, "I should have gotten a gun and just started shooting." In one video, he appeared to be in a packed New York City subway car, raising his finger to point out passengers one by one.
James’ lawyers informed the judge on Dec. 21 that he wanted to plead guilty, an about-face from his earlier vow to fight the charges at trial. James has been jailed since the shooting in a federal lockup just blocks from where the attack took place.
In a jailhouse interview with The Associated Press in August, James spoke about his lifelong struggle with mental health and the notoriety he gained at the Metropolitan Detention Center in Brooklyn, where he befriended the disgraced R&B star R Kelly.
"It’s going to be a long case," a sanguine and bespectacled James told the AP. "People don’t have enough information yet to judge me."
"All in all I’m a good person at heart," he added. "I’ve never hurt anybody."
But prosecutors say James planned the shooting for years and terrified all of New York City with an attack that upended the ritual of the morning commute and endangered dozens of lives.
James was arrested in Manhattan a day after the shooting after calling a police tip line to say where he was. Police were already searching in the area where James was located after a sharp-eyed high school photography student called in a tip about a man, believed to be the suspect, sitting on a bench with a duffel bag.
Prosecutors said a trove of evidence connected James to the attack. His bank card, cellphone and a key to a van he had rented were found at the shooting scene. Officers also found the handgun they said was used in the shooting; tracing records show James purchased the gun from a licensed gun dealer in Ohio in 2011.
In court papers, prosecutors suggested James had the means to carry out more attacks, noting that he had ammunition and other gun-related items in a Philadelphia storage unit. The New York City native had been living in Milwaukee and Philadelphia prior to the shooting.
Associated Press reporters Jim Mustian and Larry Neumeister contributed to this report.