"The worldwide community has reached a new crossroads; and we are facing a choice between cooperation and confrontation, between opening-up and a close-door policy, and between mutual benefit and a beggar-thy-neighbor approach", Xi said.
"Unilateralism and protectionism are mounting, dealing a severe blow to multilateralism and the multilateral trading regime", he said, without mentioning the United States by name. "Access to the global economy through trade has underpinned China's economic success over the past two and a half decades".
Ramaphosa will host Xi and the leaders of Brazil, Russia and India at a summit of the BRICS group of emerging economies in Johannesburg later this week, where he will be looking to secure further investment pledges.
U.S. President Donald Trump earlier on Wednesday accused China of "vicious" tactics on trade, tweeting that China was specifically targeting U.S. farmers with retaliatory tariffs because "they know I love & respect" them.More news: Mega Millions lottery: Grand prize of $522 million up for grabs today
"The concern that South Africa has with the protectionist policies by President Trump at this stage, is that it is playing havoc with the local market".
The BRICS countries comprise more than 40% of the global population but have never worked as a co-ordinated economic bloc.
The agreements were signed on the eve of the three-day 10th BRICS Summit, which opens in Johannesburg on Wednesday.
Analysts say USA trade policy could give the group renewed objective.More news: Pogba finds it harder to focus at United - Mourinho
The two leaders took the opportunity to "strengthen the comprehensive strategic partnership" between the two Brics nations as they signed several agreements and memorandums of understanding "intended to deepen relations".
Davies says South Africa wants to strengthen its investment relationship with China.
Signalling diplomatic rivalry over influence in Africa, India's Modi visited Rwanda and Uganda on his own five-day tour of the continent including the BRICS summit. The summit runs through Friday with various heads of BRICS attending. Turkey's president, Recep Tayyip Erdogan, has also been invited.More news: Toronto police delving into life of gunman in mass shooting