The man, Sayfullo Saipov, was charged in Federal District Court in Manhattan with eight counts of murder in aid of racketeering activity, 12 counts of attempted murder in aid of racketeering activity, providing material support and resources to a foreign terrorist organization, and violence and destruction of motor vehicles.

The racketeering activity referred to the terrorism of the Islamic State, also known as ISIS; according to the indictment handed up by a grand jury on Nov. 21, Mr. Saipov acted “for the purpose of gaining entrance to ISIS.”

After plowing through bikers and pedestrians on the Hudson River Greenway shortly after 3 p.m. on Oct. 31, Mr. Saipov leapt out of his rented Home Depot truck and brandished a pellet gun and a paintball gun, shouting “Allahu akbar,” Arabic for “God is great,” before he was shot by a police officer, the authorities said.

Investigators also found handwritten notes in Arabic near the truck that indicated allegiance to the Islamic State. On Mr. Saipov’s cellphone, F.B.I. agents discovered thousands of videos and images, including those of Islamic State fighters and instructions for making an explosive device, according to the criminal complaint filed Nov. 1.

At Bellevue Hospital Center in Manhattan, where Mr. Saipov was taken after being shot, he asked officials to hang the Islamic State flag in his hospital room, the complaint said. He told them he “felt good about what he had done.”

Mr. Saipov, 29, appeared before Judge Vernon S. Broderick on Tuesday in greenish-gray pants and a dark blue shirt that hung loosely on his rail-thin frame. While he arrived in a wheelchair to his first court appearance on Nov. 1, he walked on his own on Tuesday.

His lawyer, David Patton, the chief federal public defender in New York City, announced Mr. Saipov’s not guilty plea. Mr. Saipov spoke only once, answering “Yes” in a loud, strong voice when the judge asked if he could hear his Uzbek interpreter. (Mr. Saipov immigrated from Uzbekistan in 2010.)

The murder charges and the charge of violence and destruction of motor vehicles carry a possible death sentence. President Trump has called for Mr. Saipov to receive the death penalty, but officials have not decided whether they plan to pursue it. The final decision usually rests with the attorney general.

Mr. Patton told the judge he plans to submit a recommendation for learned counsel, or a lawyer with experience in death penalty cases, within a month.

It is rare for federal prosecutors to seek the death penalty. In Manhattan, federal prosecutors have not sought the death penalty since the case of Khalid Barnes, who was convicted in 2009 of two drug-related murders. A jury sentenced him to life in prison.

In the murder of two New York police detectives, juries in Federal District Court in Brooklyn sentenced Ronell Wilson to death in 2007 and again in 2013, after an appeals court vacated the first sentence. A federal judge struck down the second sentence in 2016.

In another high-profile terrorism case, a Boston jury in 2015 sentenced Dzhokhar Tsarnaev, who was convicted of orchestrating the 2013 Boston Marathon bombing, to death; it was the first time a federal jury had sentenced a terrorist to death in the post-Sept. 11 era, Kevin McNally, director of the Federal Death Penalty Resource Counsel Project, said at the time.