It applies to everyone in the world, everywhere in the world. People who break the law can be prosecuted if they go to Hong Kong.
That has brought an unexpected headache for foreign universities, which are scrambling to work out how to protect their students from saying and writing things that might later be used against them.
Foreign institutions renowned as bastions of free speech are having to deal with Chinese censorship.
Anyone who criticises China and travels to Hong Kong is potentially at risk of arrest under the new law.
But Hong Kong students studying abroad face a particular threat because they will at some point return to the former British territory. They cannot avoid going to Hong Kong in the same way foreigners can.
The law has made them worried about how to act while abroad.
"We are used to the Hong Kong government damaging our speech in Hong Kong, but we expected more freedom to speak in the UK," said one Hong Kong student at Leeds University. "It feels like we are still being monitored."
The fact that she did not want to give her name is an indication of how wary she feels.
Another Hong Kong student at Leeds, who again wished to remain anonymous, said he would now say less in class to try to avoid getting into trouble.
Shaun Breslin, a professor of politics and international studies at Warwick University, said one of his first instincts at the start of this academic year was to dissuade Hong Kong students from taking certain politically sensitive courses.
"But you can't do that because that's denying them an opportunity that every other student from every other part of the world is allowed to do," he said.
"It would be falling into the trap of not self-censorship, but of censoring other people."
So, his university, like others in the UK and the United States, is quickly working out codes of conduct to protect students as much as possible.
"We don't record seminars, you can't associate a specific set of words or opinions with individuals, and we've sent out lots of reminders about etiquette," said Prof Breslin.
At Oxford University, an associate professor involved in Chinese studies is allowing her students to submit their work anonymously to protect them, a position supported by her superiors.
"The university remains committed to academic freedom of speech and thought, and to fully supporting its academics in how they choose to teach," the university said in a statement.
The issue is being debated in many universities.
Sophia Tang, a law professor at Newcastle University, recently held an online seminar about the extraterritoriality of Hong Kong's national security law.
She said Hong Kong students were keen to know how it would affect them while studying abroad.
But that is not easy to assess. One big problem for students is that it is difficult to know what is allowed and what is illegal, because the law was drafted so broadly.
The legislation outlaws behaviour that undermines China's national security, but that even includes acts that provoke "hatred" of the Chinese government.
Does that include criticism of the government?
"A lot of key concepts are very ambiguous, so we don't know what speech has the potential to provoke," said Prof Tang.
Many think the ambiguity is deliberate, to spread fear and uncertainty.
The Chinese government's desire to limit what people say about China from overseas is not new. Mainland Chinese students studying abroad already face the possibility of arrest when they return home for the things they have said overseas.
And China routinely attacks foreign governments, companies, think-tanks, sports personalities - even boy bands.
It recently criticised the South Korean pop group, BTS, when one of its members failed to mention Chinese soldiers while honouring those who died during the Korean War.
China usually tries to pressure outsiders by using its economic power to sanction those who say things it does not like. That means foreign universities with a financial stake in China are in a vulnerable position.
Before the coronavirus pandemic, there were about 120,000 Chinese students studying in the UK, with many British universities dependent on the income they brought in.
What if the Chinese government stopped them coming in the future? Earlier this year, that is exactly what it advised Chinese students wanting to go to Australia.
Some universities have even closer ties, and so are potentially more exposed. Liverpool University has opened a campus in China with Xi'an Jiaotong University.
It might not affect their work, but even foreign academics specialising in China know there could be repercussions if the Chinese government does not like what they say. Beijing refuses to give some of them visas to enter the country.
"I am generally very careful. I know there is a line you cannot cross," said Newcastle's Prof Tang, explaining the difficulties inherent in dealing with Chinese officialdom.
Prof Tang has close ties with Wuhan University in China.
"I do not want to talk too much about politics," she admitted. "If people ask me whether China has breached international law, I will tell them that I am not an expert in the field."
So, foreign universities have for some years been susceptible to pressure from China. But, as Prof Breslin put it, never before like this.
Beijing's national security law means people across the world could potentially end up being charged in Hong Kong.