Speaking at the closing session of the annual parliament, Mr Xi said China was at a critical stage in its history and only socialism could save it.
He also warned against Taiwanese separatism or attempts to split China.
Mr Xi is now set up to be China’s president for life, after the NPC removed a two-term limit.
The motion was overwhelmingly approved by the roughly 3,000 delegates at the start of the session.
The parliamentary session meets once a year. It essentially rubberstamps changes already decided by the leadership.
In his speech in the Great Hall of the People, Mr Xi laid out his grand vision for China, reconfirming his ambition to “rejuvenate” the country and continue China’s “great contributions to civilisation”.
“History has already proven and will continue to prove that only socialism can save China,” he said.
He said he saw the people as “the real heroes” of China and that he and all fellow politicians “must work hard for the people’s interests”.
The president also highlighted major achievements of Chinese history from the invention of paper and gunpowder to building the Great Wall or the writings of Confucius.
Pointing at China’s global ambitions, Mr Xi said his country would be strong but not aggressive and would not develop itself at the expense of the rest of the world.
The president’s speech was followed by Premier Li Keqiang’s annual news conference.
also stressing that Beijing wanted to co-operate with other countries based on market rules, and that its global trade efforts would be mutually beneficial.
Mr Li said China would further open up its economy and “ensure that both domestic and foreign firms” were “able to compete on fair terms in China’s large market”.
The premier’s comments are a marked contrast to the recent protectionist rhetoric and threats of tariffs from the Trump administration in the US.
President Xi also said China had to be united to prosper and, in a reference to Taiwan, said Beijing would thwart any separatist attempts.
“The Chinese people share a common belief that it is never allowed and it is absolutely impossible to separate any inch of our great country’s territory from China.”
Self-ruling Taiwan is considered by Beijing to be a separatist province which will one day be reunited with the mainland. It remains a major potential flashpoint in the region.
Mr Xi’s comments come just days after a new US law was passed which encourages sending more senior officials to Taiwan to meet their counterparts and vice versa.
Washington does not have formal ties with Taiwan and China is strongly opposed to any moves that would suggest the international community recognises Taiwan as an independent country. (Courtesy BBC)