The epicentre of the quake, which hit at 7:40 pm (1740 GMT), was 238 kilometres (about 150 miles) northwest of Botswana's capital Gaborone, the US Geological Survey said.
It struck at a relatively shallow depth of 11 kilometres, and rumbled throughout the capital for about 30 seconds, an AFP correspondent said.
No reports on damages were immediately available.
The quake was also felt in several cities in South Africa as well as in Swaziland and Zimbabwe, several hundreds of kilometres from the epicentre, witnesses said.
Earlier today, a smaller quake with a magnitude of 4.6 was recorded in northwestern South Africa.