The quake struck Afghanistan's northern Hindu Kush region at a depth of 189km, according to the German Research Centre for Geosciences.
Strong shaking was also felt in Pakistan's capital Islamabad and Indian capital New Delhi, the UAE's National Centre of Meteorology said.
The tremors were "very strong" near to the epicentre in the northern province of Badakhshan.
There were no immediate reports of casualties.
Provincial official Mahzudden Ahmadi told Reuters that authorities were verifying whether they had caused any damage or casualties.
"It was too strong. In the beginning we did not leave, but later when it got strong, we left (the room). It lasted about 30 t 40 seconds," Ashraf Nael, 28, from Faizabad city in Badakhshan, told Reuters.
Last year, a magnitude 6.1 earthquake in Afghanistan killed more than 1,000 people.