He followed the tweet with another one, finishing Mandela's quote: "...For love comes more naturally to the human heart than its opposite."
The former president is being praised for his public response to the Charlottesville rally, while current president Donald Trump appeared reluctant to address the issue.
Trump first said there were "many sides" acting wrongly and did not call out the white surpremacists. After an uproar, he condemned the rally while seemingly reading from a teleprompter.
Obama's tweet is currently the third most liked tweet of all time. Ariana Grande's tweet from earlier this year after the deadly attack at her Manchester concert is the most liked.
Prior to Grande's tweet, the most popular tweet of all time had been Ellen DeGeneres' Oscars selfie, which is now at the number two spot.