The ceremony will be held on Friday. Ban will participate in a relay in which the Olympic Torch is handed over, Xinhua news agency quoted UN spokesperson Stephane Dujarric as saying on Tuesday.
Ban will also meet the Refugee Olympic Team during his stay in Rio, Dujarric said.
The Rio Olympics will be held from August 5 to 21 and the Paralympics from September 7 to 18.
More than 10,000 athletes from a record number of countries will participate in the 2016 summer Olympics.
For the first time ever, a team of refugees will participate under the Olympic flag in the Games.