Premier Li Keqiang flew to Ya'an to direct rescue efforts, and he and President Xi Jinping ordered officials and rescuers to make saving people the top priority, Xinhua said.
The Chinese Red Cross said it had deployed relief teams with supplies of food, water, medicine and rescue equipment to the disaster areas.
With roads blocked for several hours after the quake, the military surveyed the disaster area by air. Aerial photos released by the military and shown on state television showed individual houses in ruins in Lushan and outlying villages flattened into rubble. The roofs of some taller buildings appeared to have slipped off, exposing the floors beneath them.
A person whose posts to the micro-blogging account "Qingyi Riverside" on Weibo carried a locator geotag for Lushan said many buildings collapsed and that people could spot helicopters hovering above.
The earthquake administration said there had been at least 712 aftershocks, including two of magnitude-5.0 or higher.
"It's too dangerous," said a person with the Weibo account Chengduxinglin and with a Lushan geotag. "Even the aftershocks are scary."
While rescuers and state media rushed to the disaster scene, China's active social media users filled the information gap. They posted photos of people fleeing to streets for safety and of buildings flattened by the quake. They shared information on the availability of phone services, apparently through data services.