Malaysia invested heavily in South Africa’s economy post-Apartheid. Between 1995 and 1997, the principal sources of direct foreign investment in South Africa were first the United States and then, surprisingly, Malaysia, followed by Germany, the United Kingdom, and Japan. Apartheid had been a major foreign policy priority for Malaysia in the 1980s and early 1990s. The Malaysian PM Mahathir Mohamad had pushed for international cooperation in sanctioning South Africa, while providing support to the African National Congress, the opposition party in South Africa. Nelson Mandela even visited Malaysia for four days within a year of his release from prison. With such a background, it was natural for Malaysia to transition to supporting South Africa after the end of Apartheid.
However, that does not explain why Malaysia cared about South Africa’s Apartheid in the first place. This was part of Malaysia’s larger policy (since the 1960s) in “south-south cooperation.” They thought it important for post-colonial countries to help each other and reduce their dependency on industrialized nations. South-south cooperation also was tied to Malaysia’s active involvement in the Non-Aligned Movement. If post-colonial countries worked together, it would strengthen countries’ ability to stay out of Cold War entanglements with the US or the USSR.