Almost 3,000 athletes competed in 109 events across 15 disciplines during the past two weeks.
Norway topped the medal table with a total of 37 medals with Germany and China coming second and third respectively.
Addressing the closing ceremony, International Olympic Committee president Thomas Bach called for political leaders "around the world" to be inspired by the athletes' "example of solidarity and peace".
"This unifying power of the Olympic Games is stronger than the forces that want to divide us," he said.
Bach said the athletes had "given peace a chance," with his comments coming amid rising tensions between Russia and Ukraine.
"Each and every one of you strived to achieve your personal best. We were deeply touched how you were wishing and cheering for your competitors to achieve their best as well," he said.
"You not only respected each other: you embraced each other, even if your countries are divided by conflict."