"The participants in the Sochi Games may carry the flags of many nations, but they come together under the shared banner of equality, fair play, mutual respect and non-discrimination," Ban said in a statement seeking the truce during the Sochi Games as well as the Paralympic Games in March.
He asked "all those involved in the games - governments, groups, organisations and individuals - to uphold and defend these core Olympic ideals."
Russia triggered criticism and boycott calls for the Games in June, when it banned spreading "gay propaganda" to children.
Critics denounced the law as discriminatory and said it is a curb on rights to free speech and assembly.
In November, the UN General Assembly called for an international truce in armed conflicts during the Winter Olympics and urged Moscow "to promote social inclusion without discrimination."
Senior government officials from Germany, France, the United States and Britain have said they won't attend the Sochi Games.
While the decisions were not officially linked to the gay rights issue, they were made amid pressure from rights groups not to attend.
The United Nations declined to comment on whether Ban will attend the opening ceremony on February 7.
US President Barack Obama made clear last month that his inclusion of three openly gay athletes in the official US delegation was intended to send a message to Russia. Britain is sending a government minister responsible for the country's recently passed same-sex marriage laws.
Russian President Vladimir Putin has said everything was being done "so that participants and guests feel comfortable in Sochi, regardless of nationality, race or sexual orientation."
He said there is no gay discrimination in Russia, which decriminalised homosexuality in 1993. But the mayor of Sochi said on Monday that homosexuality was not accepted in his Caucasus region, though gay visitors would be welcome at the Games if they respected Russian laws.
- Politics & Government
- Cultural Groups
- Paralympic Games