People in festive mood have filled a stadium for the ceremony but police drove back other Kenyatta supporters trying to get in without seats.
Riot police were also deployed in another part of the city to stop a rally by opposition supporters.
Opposition leader Raila Odinga has mocked Mr Kenyatta’s “coronation
He boycotted the re-run of the presidential poll last month and says Mr Kenyatta was not elected legitimately.
Mr Kenyatta was officially re-elected with 98% of the vote on 26 October but just under 39% of voters turned out.
The original election on 8 August was held over again after being annulled by the Supreme Court on grounds of irregularities
There were scenes of chaos outside Nairobi’s Kasarani sports stadium when people without seats tried to rush in and were driven back by police with tear gas, and on horseback.
Big screens had been promised so that tens of thousands of people could watch the ceremony from outside the stadium but no screens were provided, AFP news agency reports.
“I just want to see President Uhuru Kenyatta because I voted for him,” Janet Wambua, who was among the angry crowd, told agency. “Why are we being beaten?”
Chief Justice David Maraga said the August election had not been “conducted in accordance with the constitution” and declared it “invalid, null and void”.
The Supreme Court ruled that the result had been “neither transparent nor verifiable”.
But Mr Odinga urged his supporters to boycott the second vote because he said no reforms had been made to the electoral commission since the original poll.
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.
In the opposition stronghold of Kisumu, in the west of the country, local people told BBC News they were not happy with the inauguration.
“I am going to peacefully accept and move on but I won’t recognise this presidency,” said one man.
“I don’t even think I’d ever go to any government office to seek for services because I know it’s a government that has come to office by force, it has killed people to be there.”
A woman said Mr Kenyatta had not won fairly.
“A large part of the country did not vote – Kisumu being a major part that did not vote – and so we feel that it’s not time to move on,” she said. “It will not be an easy thing to do.”