The China Earthquake Networks Center said the quake hit the Hindu Kush area.
Residents of Kashgar, Hotan and Kizilsu Kirgiz prefectures of southern Xinjiang, the autonomous region that borders Afghanistan felt strong tremor, state-run Xinhua news agency reported.
Deng Jiaping, a citizen of Kashgar, told Xinhua that the building she lives in shook for less than a minute, toppling her desktop computer and sending neighbors running out for safety.
Some railway sections in the south of Xinjiang were closed for safety checks after the quake.
Local authorities in Xinjiang are still assessing conditions in the affected regions.