Odinga was later sworn-in in a controversial ceremony, which the government had outlawed, terming the action treasonable. He won an election re-run in October, but Mr Odinga boycotted it.
Mr Odinga's supporters insist that he, not Mr Kenyatta, is Kenya's legitimate leader, and that Mr Kenyatta's election was neither free nor fair.
Kenya's government had warned that Tuesday's mock inauguration of Odinga as "the people's president" after months of election turmoil would be considered treason. It also said it ruled against Kenyatta because the commission refused to open its computer system for court scrutiny to dispel Odinga's claims.
Still, holding a green Bible in his right hand and sandwiched by his former aide, Miguna, and Orengo, Raila recited his oath before thousands of his supporters.
Analyst William Atwell of the Frontier Strategy Group told CNBC that Odinga is not seriously attempting to stage a coup, but rather seeks to "remain relevant, gain media attention, and remain in the public eye".
Earlier, Nairobi Governor Mike Sonko had banned the public from accessing the historic grounds citing planned upgrading of the park after Nasa and the Nairobi Business Community claimed to have booked the premises for use on Tuesday, January 30. "We will not allow that", said Nairobi police chief Japheth Koome. Police have vowed to block opposition supporters from attending the event.
NTV Kenya has been shut down by the Communications authority while airing proceedings at Uhuru Park where the opposition Nasa swearing in is. Royal Media Services Managing Director Wachira Waruru asked the government to explain the reason for Tuesday's switch-off.More news: A Look At The Grammys 2018 winners list
The channels' Live YouTube streams were not affected.
The Nasa leader said he would not read his speech, promising to give copies to the media as he was quickly shepherded out of Uhuru Park.
Threats have been made in the past and some media groups have been raided but none have had their signal deliberately disrupted.
The attorney general of Kenya said Odinga could be charged with treason, a crime that can carry the death penalty, reported Reuters news agency.
Why is the election result disputed?
Kenyatta won repeat polls with more than 98 percent of the votes cast. He was inaugurated in November.