The quake was recorded at 12:52 p.m. local time (0452 GMT) in the mountainous province of Sichuan, with an estimated depth of 10 kilometers and an epicenter about 43 kilometers from the city of Kangding.
Authorities reported no immediate deaths or injuries.
Videos posted on social networks by Internet users showed chandeliers swinging from the ceiling or an aquarium filled with fish and whose water overflowed due to the shaking.
Other images showed buildings shaking and rocks falling along the cliffs.
Sichuan is regularly affected by earthquakes. The earthquake was felt in several cities in the province, including the regional capital Chengdu, which has a population of 21 million and is located some 200 kilometers away.
The tremor was "relatively strong", a resident who did not give her full name, Ms. Chen, told AFP. "Some of my downstairs neighbors said they felt (it) very clearly," she added.
The city of Chengdu extended the confinement of its inhabitants on Sunday after the discovery in recent days of hundreds of new positive cases of the coronavirus.
More than 500 firefighters and rescuers have been dispatched to the epicenter of the earthquake, the official Xinhua news agency said. Authorities reported multiple aftershocks in the vicinity of the first earthquake.
A resident of Chongqing, a large municipality-province yet located more than 400 kilometers from the epicenter, told AFP that the lamps in his apartment had started to shake.
Sichuan, very mountainous and known worldwide for its panda reserves, is generally hit several times a month by earthquakes of varying intensities.
In June, a 6.1 magnitude earthquake had already shaken the province, killing at least four people and injuring dozens.
In May 2008, a very powerful earthquake, of magnitude 7.9, left 87,000 dead or missing in Sichuan. The disaster was a national shock.
Among the victims were thousands of students killed in the collapse of precariously constructed schools. Police at the time arrested activists who were trying to count the precise number of children who died in the disaster.