The pair added 218 for the sixth wicket to pass the previous best of 165, shared by Australians Mike Hussey and Brad Haddin (v West Indies at Kuala Lumpur in 2006) and New Zealanders Craig McMillan and Brendon McCullum (v Australia at Hamilton in 2007).
Asia were reeling at 72-5 following Kenyan Peter Ongondo's triple strike before skipper Jayawardene (107) and wicket-keeper Dhoni (139 not out) came to their team's rescue with commendable knocks in hot and humid conditions.
Sri Lankan Jayawardene hammered two sixes and nine fours in a 106-ball knock for his 10th century in one-day internationals before falling in the closing overs.
India's Dhoni gave a superb exhibition of power hitting as he struck five sixes and 15 fours in a 97-ball innings for his third hundred in one-dayers.
Asia, who have already gained a winning 2-0 lead, were in trouble in the initial overs against disciplined African bowling and fielding before Jayawardene and Dhoni altered the course of the innings.
Seamers Ongondo (3-35) and Morne Morkel (3-50) were brilliantly backed by their fielders, with skipper Justin Kemp and AB de Villiers taking spectacular catches to keep pressure on the Asian side.
Kemp took a diving one-handed catch at second slip to account for India's opener Virender Sehwag, while De Villiers dived to his left at point to dismiss Sri Lanka's Upul Tharanga.
But Dhoni and Jayawardene put paid to Africa's hopes of restricting Asia to a modest total with their exciting strokeplay during their 178-ball partnership. They helped their side plunder 108 in the closing 10 overs.