The measures are aimed at keeping residents safe and not endangering the lives of emergency services personnel, Mayor Michael Bloomberg said in a press conference.
The evacuation order covers areas of the city prone to flooding caused by the heavy rains expected from the hurricane.
New York Gov. Andrew Cuomo, meanwhile, announced that the transit system would close down in the city on Sunday evening.
The storm, which has maximum sustained winds of 120 kph (75 mph), is about 400 kilometers (250 miles) southeast of Cape Hatteras, North Carolina, and about 930 kilometers (575 miles) south of New York City, the National Hurricane Center, or NHC, said in its 11:00 a.m. advisory.
The hurricane is “expected to bring life-threatening storm surge flooding to the mid-Atlantic coast … including Long Island Sound and New York Harbor … winds expected to be near hurricane force at landfall,” the NHC said.
Sandy is moving northeast at about 22 kph (14 mph), the NHC said.
“Hurricane-force winds are expected along portions of the coast between Chincoteague, Virginia, and Chatham, Massachusetts. This includes the middle and upper Chesapeake Bay … Delaware Bay … and the coasts of the northern Delmarva Peninsula … New Jersey … The New York City area … Long Island … Connecticut … and Rhode Island,” the NHC said.
The storm is having an effect on the presidential race, with both President Barack Obama and his Republican challenger, Mitt Romney, being forced to cancel events and change campaign plans.
Romney cancelled all his planned events Sunday in Virginia and will focus on the key battleground state of Ohio, where polls give the president a narrow lead.
Obama will not campaign in Virginia on Monday and cancelled an event scheduled for Tuesday in Colorado, another state that could prove key to deciding who the next president of the United States will be.
The president is scheduled to visit the headquarters Sunday of the Federal Emergency Management Agency, or FEMA, to get a firsthand look at the preparations being made to deal with Sandy, which is expected to batter the Middle Atlantic and Northeast with powerful winds and heavy rains, causing flooding and power outages.
Obama plans to travel to Orlando, Florida, later in the day for a rally with former President Bill Clinton on Monday and will travel from there to Ohio.
The president will then return to the White House to monitor Hurricane Sandy.