De Blasio said officials opted to close schools out of an abundance of caution after coronavirus test positivity rates hit the 3% threshold.
"We must fight back the second wave," the mayor said on Twitter.
NYC principals are being told to take necessary items home with them as remote teaching will begin in the morning.
Students will shift to remote learning during the indefinite shutdown and all school buildings will remain closed until further notice, NYC Department of Education Chancellor Richard Carranza informed parents in a letter sent to them on Wednesday.
"Please note that this is a temporary closure, and school buildings will reopen as soon as it is safe to do so," the letter, obtained by Fox News, said.
"I know that for many of you, this decision to temporarily close school buildings that we recently opened up will be disappointing, and I understand," Carranza wrote. "But by confronting these challenges together, we can continue to fight back against COVID-19. And I am confident that before long, we will be able to safely reopen our school buildings again."
For days, the city has seen infection rates creeping upward, and de Blasio had previously warned closures could be imminent to keep children safe.
De Blasio said the city could be implementing "additional restrictions" in New York City that could impact other industries, he announced at a press conference on Wednesday, as he also urged more people to get tested for the virus.
The school closures come just days after parents submitted their decision opting for blended learning-- a mix of online coursework and in-person instruction-- or fully remote classes for their child.
The chancellor said students who opted for the blended option can return to in-person classes when schools reopen.
The 3% threshold for NYC school closures has been a flashpoint for lawmakers, school officials and parents, as some argue the number is unnecessarily low. Even Gov. Andrew Cuomo has urged de Blasio to raise the threshold, citing lower infection rates in schools when compared to the city at large.
Carranza said school infection rates have been 0.91% but the mayor has purposefully kept the number low to err on the side of safety.