"Saipov requested to display ISIS's flag in his hospital room and stated that he felt good about what he had done", the charging document revealed.
After a gunman shot dead 58 people last month in Las Vegas, IS claimed the killer was also one of its "soldiers" but the Federal Bureau of Investigation said it found no such links with the accused, Stephen Paddock.
Prosecutors unveiled the charges, saying he had waived his rights and confessed to being inspired by IS propaganda, after yelling "Allahu akbar" ("God is greatest" in Arabic) upon exiting a rented pickup truck in Lower Manhattan on Tuesday.
Saipov reportedly admitted to watching IS videos on his cell phone, before mowing down people on a bike path in the Manhattan neighborhood of Tribeca in New York City on Tuesday.
The attacker has been identified as a 29-year-old Uzbek citizen Sayfullo Saipov. The criminal complaint said he chose to use a rented truck as a weapon "to inflict maximum damage against civilians". Prosecutors announced federal terrorism charges against Saipov late Wednesday, which means he can get the death penalty if convicted - even though NY state has no death penalty. "He killed 8 people, badly injured 12", Trump wrote, making reference to the driver's reported interest in the extremist group Islamic State.
He started planning the attack about a year ago while in the USA - and two months ago, he made a decision to use a truck.More news: India "disappointed" with China blocking bid to blacklist militant leader
During the last few weeks, Saipov searched the internet for information on Halloween in New York City and rented a truck to practice turns.
Outside court, Saipov's attorney said he hoped "everyone lets the judicial process play out". ISIS has also called for its followers around the world to use vehicles to kill civilians.
The president took to Twitter on Wednesday, saying Saipov should get the death penalty. "Every time they hit us, we know it is ISIS, we hit them like you won't believe", he said.
Saipov was charged with providing material support to a terrorist group and committing violence and destruction of motor vehicles, resulting in death.
And he urged Congress to end the Diversity Immigrant Visa programme under which Saipov entered the United States in 2010. The plan was carried out on Halloween because he believed there would be more people on the street, investigators said.
In the largely Muslim neighbourhood where Saipov lived with his wife and children for little over a year in the New Jersey town of Paterson, residents seethed with anger on Wednesday that he had besmirched their hard-working immigrant reputation.