Raila Odinga declared himself the “people’s president” in front of thousands of his supporters in the capital, Nairobi.
The result of the last August election was annulled following allegations of irregularities.
Uhuru Kenyatta won a re-run in October, but Raila Odinga did not take part.
President Uhuru Kenyatta was sworn in for a second term in November 2017.
He warned the media not to cover the January 30 event and the attorney general said holding such a ceremony amounted to treason.
However, the main TV stations streamed the event on their websites and on YouTube and Facebook.
Holding a bible in his right hand at a park in Nairobi, Raila Odinga declared that he was answering to a “high[er] calling to assume the office of the people’s president of the Republic of Kenya”.
People had had enough of election rigging and the event was a step towards establishing a proper democracy in the East African state, he told a cheering crowd.
Raila Odinga’s deputy, Kalonzo Musyoka was not as the event. Raila Odinga said he would be sworn in at a later date.
Speaking earlier to Kenyan broadcaster KTN, Raila Odinga said the media ban “confirms we have descended to the level of Uganda”, which stopped media coverage during elections in 2016.
He said that his “swearing-in” was intended to “show the world that what we are doing is legal, constitutional and not something you can remotely describe as a coup”.
Kenyan journalists have denounced the move as outrageous, in a statement calling for “respect of the constitution” and an end to the “unprecedented intimidation of journalists”.
Uhuru Kenyatta was officially re-elected with 98% of the vote on October 26 but just under 39% of voters turned out. He was inaugurated in November.
His victory is not recognized by Raila Odinga, who argues he was elected by a small section of the country.
Uhuru Kenyatta also won the original election on August 8, but that result was annulled by the Supreme Court, which described it as “neither transparent nor verifiable”.
When the repeat vote was called, Raila Odinga urged his supporters to shun it because he said no reforms had been made to the electoral commission.
Correspondents say the election dispute has left Kenya deeply divided. About 50 people are reported to have been killed in violence since the August ballot.
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…