Mr Xi, 64, was also unanimously elected chairman of the Central Military Commission (CMC) of the People's Republic of China (PRC), a report in Chinese state news agency Xinhua said.
In a first, Mr Xi took a public oath of allegiance to the Constitution in the Great Hall of the People.