China's Earthquake Administration said rescue efforts were underway, coordinated with the Office of the Earthquake Relief Headquarters and the Ministry of Emergency Management.
A security video shared on social media and verified by Reuters showed passengers scrambling for safety as the quake rattled a railway station.
The Xinjiang railway department suspended operations and 27 trains were reportedly affected by the quake, Xinhua News reported.
The earthquake was felt strongly in Urumqi, Korla, Kashgar, Yining and surrounding areas, according to posts from users on China's Weibo social media platform.
The epicentre of the quake was struck at 2:09 a.m. (1809 GMT) at a depth of 22 km (13 miles) in the mountainous border area of Wushi County in northwest China's Xinjiang region, according to the China Earthquake Administration.
Five villages were within a 20-km radius around the epicentre, Xinhua News said, citing the Xinjiang Earthquake Agency.
No people were reported missing as of 7:30 p.m Tuesday (1130 GMT).
More than 12,400 people affected by the temblor were evacuated as rescue work continued, state television channel CCTV reported.
As of 8 a.m. (0000 GMT), 40 aftershocks were recorded, according to China Earthquake Networks Center.
Over the past 24 hours, Xinjiang has been struck by a few significant earthquakes. In nearby Kazakhstan, the emergencies ministry reported the latest earthquake at a magnitude of 6.7.
The tremors were also felt in Uzbekistan.