According to the US Geological Survey, the quake's epicentre was in the northern province of Badakhshan, close to the Pakistani and Tajik borders.
It is not clear if there were any casualties in the area itself, but at least 17 people were injured in the Pakistani city of Peshawar.
Hundreds were killed by a quake in the same area on 26 October.
Residents in the Afghan capital, Kabul, and the Pakistani capital, Islamabad, were reported to have run into the streets after feeling the impact of the quake.
In Peshawar some old homes and walls collapsed, Hamid Nawaz, the head of Pakistan's disaster management authority, told AP.
The region has a history of powerful earthquakes caused by the northward collision of the Indian and Eurasian plates. They are moving towards each other at a rate of 4-5cm per year.
In 2005, a magnitude 7.6 quake in Pakistan-administered Kashmir left more than 75,000 people dead.
In April this year, Nepal suffered its worst earthquake on record with 9,000 people killed and about 900,000 homes damaged or destroyed.
A powerful 6.3-magnitude earthquake has struck northern Afghanistan, with tremors felt as far away as India.