This is according to the latest Africa Investment Index 2016 by Quantum Global, published on Wednesday.
South Africa received the No.4 ranking because it scored well on the growth factor of GDP, ease of doing business in the country and significant population.
Botswana was named the most attractive economy in Africa due to a range of factors that include improved credit rating and ease of doing business.
Morocco was ranked second based on its increasing solid economic growth, strategic geographic positioning and increased foreign direct investment.
Egypt was ranked third due to an increased foreign direct investment and real interest rates, and a growing urban population, while Zambia was the fifth country on the list due to its significant domestic investment.
According to the report, the top five African investment destinations attracted an overall foreign direct investment of $13.6 billion (R179bn).
Head of Quantum Global Research Lab, Professor Mthuli Ncube, said Africa offered opportunities to invest in non-commodities sectors such as financial services, construction and manufacturing.
“Despite considerable external challenges and the fall in oil prices, many of the African nations are demonstrating an increased willingness to achieve sustainable growth by diversifying their economies and introducing favourable policies to attract inward investments,” Ncube said.
“Botswana is a case in example - its strategic location, skilled workforce and a politically stable environment have attracted the attention of international investors leading to a significant influx of FDI.”