The 6.0 magnitude earthquake struck near Yibin in Changning County, south-east of the provincial capital Chengdu, late on Monday, officials said.
It was followed by several powerful aftershocks.
TV footage showed rescuers pulling injured people from the rubble of collapsed buildings.
More than 4,000 people have had to be relocated because their homes were destroyed or damaged, state media reported.
China Central Television showed the aftermath of a landslide that had blocked a road and left a lorry engulfed in debris.