The quakes, roughly 30 minutes apart, hit the southwestern province of Sichuan late on Monday, with shaking felt in key regional cities, such as the provincial capital of Chengdu and the metropolis of Chongqing.
People rushed into the streets and cracks were left in some buildings by the quakes, pictures posted on the social media accounts of state media showed.
Rescuers pulled some people out of rubble alive near the epicentre, in a largely rural area, state television added.
A quake of magnitude 5.9 was followed by a smaller one of 5.2 magnitude, both at a depth of 10 km (6 miles) and centred near Changning county, the United States Geological Survey said.
There were several aftershocks, the China Earthquake Administration said, while the U.S. quake agency recorded one of magnitude 5.2 on Tuesday.
In May 2008, Sichuan suffered a huge earthquake that killed almost 70,000 people.