Mayor Bill de Blasio says the city faces "an unprecedented threat" and needs a "wartime mentality".
A school in New York.
New York City is closing schools on Monday, and restaurants, bars and other venues a day later in an effort to halt the spread of the deadly coronavirus.
Mayor Bill de Blasio said he decided to act because "our city is facing an unprecedented threat, and we must respond with a wartime mentality".
Separately, the US is extending its European travel ban to include the UK and Republic of Ireland.
The US has confirmed 69 deaths linked to the pandemic and 3,774 infections.
New York City - which has the population of more than eight million - has recorded five deaths. Each of the victims - aged 53 to 82 - had underlying health conditions, officials say.
Last week, a top US health official admitted that the country's testing system for coronavirus was failing.
President Donald Trump has said the US has "a tremendous testing set up where people coming in have to be tested".
Correspondents say there is a growing sense of unease and confusion in America, with fears of a run on hospital beds and concern about childcare as tens of millions of children are sent home from school.
What about the closures in NYC?
On Sunday, Mayor de Blasio said the city's public schools would be closed from Monday until at least 20 April, in what he described as "the painful decision".
He said officials would then review on whether to re-open, but did not rule out that schools would remain shut for the rest of the academic year.
Separately, Mayor de Blasio said that from 09:00 EDT Tuesday (13:00 GMT) the city's restaurants, bars and cafes would be limited "to food take-out and delivery".
"The virus can spread rapidly through the close interactions New Yorkers have in restaurants, bars and places where we sit close together. We have to break that cycle," he said in a statement.
New York City has about 27,000 restaurants, according to the city's health department.
Mayor de Blasio also said that "nightclubs, movie theatres, small theatre houses, and concert venues must all close".
"This is not a decision I make lightly. These places are part of the heart and soul of our city. They are part of what it means to be a New Yorker," his statement said.
Americans are waking up to a new reality as the coronavirus spreads, with store shelves stripped bare of essentials, schools closed and millions of jobs in jeopardy as businesses temporarily shut their doors.
The US Federal Reserve cut interest rates to near zero on Sunday in another emergency move to help shore up the country's economy. President Donald Trump called the move "terrific" and "very good news."
Dr Anthony Fauci, the nation's top infectious diseases expert, said the US was entering a new phase of coronavirus testing - but tempered the president's optimism.
"The worst is yet ahead for us," Dr Fauci said.
Vice-President Mike Pence said testing for coronavirus was expanding with more than 2,000 labs across the country ready to process tests and 10 states operating drive-through testing.
The White House appealed to Americans not to hoard as the virus spreads, reassuring them that grocery supply chains were strong.
What measures have been taken across the US?
Los Angeles has also decided to shut down the city's bars and restaurants.
Meanwhile, 29 US states have announced that they are closing schools.
Last week, President Trump declared a national emergency, freeing up to $50bn (£40bn) in relief funds. The move loosens regulations on the provision of healthcare and could speed up testing.
The US Centers for Disease Control (CDC) on Sunday recommended that any events with 50 or more people be called off.
The CDC said that over the next eight weeks, any such gatherings should be either cancelled or postponed, adding that this advice excluded workplaces and schools.
The US travel ban on the UK and Republic of Ireland come into force at 04:00 GMT on Tuesday. It is an extension of an earlier measure on 26 European nations in the Schengen border-free travel area.
The World Health Organization has described Europe as a "new epicentre" of the coronavirus outbreak, which originated in China late last year.
As the result of the ban, US airports have been thrown into chaos, with long queues forming as travellers waited for hours for the screenings before passing through customs.
In New York, there were reports of a flight from Paris being boarded by customs agents wearing masks.
Acting Homeland Security Secretary Chad Wolf said his office was working with airlines to improve screening times.
Some public health experts have noted that waiting in crowded terminals could potentially lead to more people becoming infected with the virus. BBC