BEIJING—In Xi Jinping’s campaign to galvanize China around threats to national security, the latest focus has turned to spies.

In recent weeks, the country has dramatically amped up a call for vigilance even from its youngest citizens, with games such as “Spot the Spy” being played in schools.

Around the first-ever National Security Education...