MOREHEAD CITY, N.C. - Whipping up trouble before ever reaching land, Hurricane Irene zeroed yesterday for a potentially catastrophic run up the Eastern Seaboard. More than 2 million people were told to move to safer locations, and New York City ordered its subways shut down for the first time because of a natural disaster.

As the storm’s outermost bands of wind and rain lashed the Outer Banks of North Carolina, authorities in points farther north begged people to get out of harm’s way. The hurricane lost some strength but still packed winds of almost 100 miles per hour, and officials in the Northeast, not used to tropical weather, feared it could wreak devastation.

“Don’t wait. Don’t delay,’’ said President Obama, who cut short his summer vacation by a day and return to Washington from Martha’s Vineyard. “I cannot stress this highly enough: If you are in the projected path of this hurricane, you have to take precautions now.’’

Hurricane warnings were issued from North Carolina to New York, and watches were posted farther north on Nantucket and Martha’s Vineyard. Evacuation orders covered at least 2.3 million people, including 1 million in New Jersey, 315,000 in Maryland, 300,000 in North Carolina, 200,000 in Virginia, and 100,000 in Delaware.

“This is probably the largest number of people that have been threatened by a single hurricane in the United States,’’ said Jay Baker, a geography professor at Florida State University.

New York City ordered more than 300,000 people who live in flood-prone areas to leave, including Battery Park City at the southern tip of Manhattan, Coney Island, and the beachfront Rockaways. But it was not clear how many would do it, how they would get out, or where they would go. Most New Yorkers do not have a car.

In addition, the city said it would shut down the subways and buses at noon today, only a few hours after the first rain is expected to fall. The transit system carries about 5 million people on an average weekday, fewer on weekends. It has been shut down several times before, including during a transit workers’ strike in 2005 and after the Sept. 11 attacks a decade ago, but never for weather.

Late yesterday, aviation officials said they would close the five main New York City-area airports to arriving domestic and international flights beginning at noon today. Many departures also were canceled. The closing airports are John F. Kennedy International, Newark Liberty International, LaGuardia, Stewart International, and Teterboro.

Mayor Michael Bloomberg said there was little authorities could do to force people to leave.