His 107 was his 10th ODI hundred for England and came off 93 balls, including five sixes.
Morgan's innings helped England recover after they had slumped to 198 for five against South Africa, the world's top-ranked 50-over side.
He received excellent support from fellow left-hander Moeen Ali, left out of England's preceding 2-0 ODI series win over Morgan's native Ireland.
Ali, a week before the Champions Trophy tournament featuring the world's top eight ODI sides gets underway in England, made 77 not out off 51 balls.
More From This Section
Despite sunny blue skies above Headingley promising ideal batting conditions, South Africa captain AB de Villiers opted to field first after winning the toss.
His decision was quickly rewarded when Jason Roy (one) was caught behind off left-armer Wayne Parnell in just the second over.
Alex Hales and England Test skipper Joe Root, on his Yorkshire home ground, made steady progress before both fell victim to Andile Phehlukwayo.
The 21-year-old seamer struck with his first ball today when Hales flat-footedly chased a wide ball and got a thin edge to wicket-keeper Quinton de Kock to give his innings away on 61.
But Morgan twice lofted Phehlukwayo for six.
Ben Stokes, back from impressing in the Indian Premier League, where he was paid a record $2.16 million to play in the Twenty20 competition, holed out for 30 and fellow IPL star Jos Buttler glanced Morris straight to short fine leg on seven.
Morgan, however, went to his hundred when he hooked fast bowler Kagiso Rabada over long leg for six.
He holed out off Morris soon afterwards but Ali kept up the attack as England plundered 102 runs in the last 10 overs.