The document, published Wednesday, says that the State Council's state security department may decide to restrict certain overseas individuals from entering if they are believed to be likely to undermine China's national security.
It may also decide to restrict people suspected of espionage from leaving the country, the document said.
According to the rules, state security agencies are responsible for the implementation of relevant regulations and public security authorities, secrecy departments and military units should cooperate within their jurisdictions.
The document also says the State Council's state security department is responsible for identifying "espionage organizations and their agents."
The identification of "hostile organizations" should be conducted by the state security department or public security authority, it said.
According to the 2014 counter-espionage law, the law also applies to the work of state security and public security agencies in preventing and stopping other acts that undermine national security.