Obama also sent two additional tweets to complete the full Mandela quote, Xinhua news agency reported.
The first of the three tweets, which features a photo of Obama visiting children at a day care center in Maryland, has been liked 2.8 million times.
It's interesting to see how the most-liked tweets compare by tweeter, content, and tone.
Mr Obama beat singer Ariana Grande's tweet, sent after the Manchester bombing attack in May.
By contrast, President Trump's first tweet in response to the tragic scene in Charlottesville got about 186,000 likes. People must learn to hate, and if they can learn to hate, they can be taught to love.
Tom Cruise injured on MI6 set
He is reprising his role as USA government operative Ethan Hun, and is continuing his policy of doing his own stunts. The video was obtained by the entertainment news website TMZ , which said the video was made on Sunday.
One woman, 32-year-old Heather Heyer, was killed, and 19 others were injured in the horrendous attack. "I don't have words", her tweet, which has about 2.7 million likes, said.
This week, at least, not as much as it loves the target of Trump's race-baiting birther campaign and the man whose legacy he's now bent on undoing: Barack Obama.
Police arrested James Alex Fields Jr., 20, Saturday after authorities identified him as the suspect accused of slamming into a pair of parked vehicles and running down counterprotesters demonstrating against the Unite the Right rally in Charlottesville.
Obama tweets infrequently in his post-presidential life.
"We condemn in the strongest possible terms this egregious display of hatred, bigotry and violence on many sides ― on many sides", Trump said on national television.
Trump received widespread criticism for failing to specifically rebuke white nationalists for violent protests in Charlottesville, Virginia.