The earthquake struck the province at 5:19 pm (local time), according to official readings by the China Earthquake Networks Centre.
The epicentre's depth was measured at 12 km at Yutian county in southwest Xinjiang.
An ensuing 5.7-magnitude quake hit the same area at 5:24 pm with a depth of 5 km followed by several tremors, the centre added.
No immediate casualties or damage have been reported.
The region is sparsely-populated mostly by ethnic Muslim Uygurs.