
Amla, 35, was rested for the first three ODIs, all of which were won by South Africa, after a poor test series last month amid growing speculation his international career is coming to an end.
Duminy, 34, is back after being out of action for several months following shoulder surgery while opener Markram, a surprise omission from the squad at the start of the five-match series, has won his place back after back-to-back centuries in domestic competition.
“Experience is always a key factor in major tournaments such as the World Cup,” said selection panel convener Linda Zondi as he announced the changes.
“We will use the final two matches in the ODI series to continue to examine all the options that are available to us as far as the World Cup squad is concerned.”
South Africa face hosts England in the opening game of the World Cup at The Oval in London on May 30.