Skyscrapers swayed in New York, and frightened workers spilled into the streets. The National Cathedral in Washington said its central tower and three of its four corner spires were damaged.
There were no immediate reports of deaths, but fire officials in Washington said there were at least some injuries. The U.S. Geological Survey said the quake registered magnitude 5.8 and was centered 40 miles northwest of Richmond, Va.
The White House said advisers told President Barack Obama there have been no reports of major damage to the nation's infrastructure, including airports and nuclear facilities.
Two nuclear reactors at the North Anna Power Station, in the same county as the epicenter, were automatically taken off line by safety systems, said Roger Hannah, a spokesman for the U.S. Nuclear Regulatory Commission.
The earthquake came less than three weeks before the 10th anniversary of the Sept. 11 attacks, and in both Washington and New York it immediately triggered fears of something more sinister than a natural disaster.
At the Pentagon, a low rumbling built until the building itself was shaking, and people ran into the corridors of the complex. The shaking continued there, to shouts of "Evacuate! Evacuate!"
The Park Service closed all monuments and memorials on the National Mall, and ceiling tiles fell at Reagan National Airport outside Washington. All flights there were put on hold.
In lower Manhattan, the 26-story federal courthouse in lower Manhattan, blocks from ground zero of the Sept. 11 attacks, began swaying, and hundreds of people streamed out of the building.
The New York police commissioner, Raymond Kelly, was in a meeting with top deputies planning security for the upcoming anniversary when the shaking started. Workers in the Empire State Building spilled into the streets, some having descended dozens of flights of stairs.
"I thought we'd been hit by an airplane," said one worker, Marty Wiesner.
Another, Adrian Ollivierre, an accountant, was in his office on the 60th floor when the quake struck: "I thought I was having maybe a heart attack, and I saw everybody running. I think what it is, is the paranoia that happens from 9/11, and that's why I'm still out here
- because, I'm sorry, I'm not playing with my life."
In Washington, the National Cathedral said cracks had appeared in the flying buttresses around the apse at one end. "Everyone here is safe," the cathedral said on its official Twitter feed. "Please pray for the Cathedral as there has been some damage."
Shaking was felt as far south as Charleston, S.C., and as far north and east as Martha's Vineyard, Mass., where Obama is taking summer vacation and was starting a round of golf when the quake struck at 1:51 p.m. EDT.
Obama led a conference call Tuesday afternoon on the earthquake with top administration officials, including his homeland security secretary, national security adviser and administrator of the Federal Emergency Management Agency.
A magnitude of 5.8 would make the quake among the most powerful to strike the eastern United States. In 1897, a magnitude-5.9 quake was recorded at Giles County, Va., the largest on record in that state.
East Coast earthquakes are far less common than in the West, but they tend to be felt over a broad area.
"The waves are able to reverberate and travel pretty happily out for miles," said U.S. Geological Survey seismologist Susan Hough.
Amtrak said its trains along the Northeast Corridor between Baltimore and Washington were operating at reduced speeds and crews were inspecting stations and railroad infrastructure before returning to normal.