In a statement on Monday, Buckingham Palace announced that Ramaphosa has accepted Charles’s invitation for a state visit from November 22 to 24.
The South African leader will be accompanied by First Lady Tshepo Motsepe.
South Africa is a member of the Commonwealth, a political association of 56 countries, mostly former British colonies.
Ramaphosa’s predecessors Nelson Mandela, Thabo Mbeki, and Jacob Zuma, the other presidents the country has had since its first multi-ethnic elections in April 1994, have also previously made state visits to the UK.
While still the prince of Wales and the Duchess of Cornwall, Charles, and Camilla, the queen consort, welcomed former South African President Jacob Zuma to the UK at the start of a state visit in 2010.
The new monarch has visited South Africa on several occasions since 1997. At Mandela’s funeral in 2013, he said the world would be a “poorer place” without the man who led South Africa’s transition from apartheid to multi-ethnic democracy, adding that Mandela was owed “an enormous debt of gratitude” for his achievements.