Xi delivered his hour-long plea at the Great Hall of the People to commemorate the May Fourth Movement, a landmark protest against colonialism and imperialism that rocked China in 1919.
The speech came as the party faces a slowing economy and a series of politically sensitive anniversaries, including 30 years since the June 4, 1989 crackdown on Tiananmen Square protesters.
"It's very shameful if a person isn't patriotic or even deceives or betrays the motherland. There is no place for such a person to stand anywhere," Xi told rows of young people, workers, soldiers and Communist Party cadres, many writing notes as he spoke.
China confirms Xi Jinping as country's most powerful leader since Mao
"In contemporary China, the essence of patriotism is to combine one's love for the country with love for the party and socialism," he said.
"Chinese youth in the new era shall listen to the words of the party and follow the steps of the party."
The May 4, 1919 protest was a nationalist movement that began when some 3,000 Beijing University students marched to Tiananmen Square in anger at the handing of German concessions in China to Japan at the end of World War I.
The protests mushroomed into calls for a cultural and political awakening to modernise China.
While Xi has repeatedly extolled the teachings of Marx and the Communist Party, authorities have cracked down on Marxist students who backed labour movements in recent months.
"In the face of external temptations, we must maintain our strength, strictly abide by the rules, create a better life with hard work and honest labour," Xi said.
"Youth should not be opportunistic and reject shortcuts."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ