The constitutional changes were passed by the annual sitting of parliament, the National People's Congress.
The vote was widely regarded as a rubber-stamping exercise. Two delegates voted against the change and three abstained, out of 2,964 votes.
China had imposed a two-term limit on its president since the 1990s.
But Mr Xi, who would have been due to step down in 2023, defied the tradition of presenting a potential successor during October's Communist Party Congress.
Instead, he consolidated his political power as the party voted to enshrine his name and political ideology in the party's constitution - elevating his status to the level of its founder, Chairman Mao.
On paper, the congress is the most powerful legislative body in China - similar to the parliament in other nations. But it was widely believed that it would approve what it was told to.
(BBC News)