“In the process of the review the books will not be available for borrowing and reference,” it said.
The law targets acts of subversion, secession, terrorism and colluding with foreign forces.
China says it will have jurisdiction in some cases and empowered its security apparatus to set up shop openly in Hong Kong for the first time, ending the legal firewall between the two.
Rights groups and legal analysts say the broad wording of the law — which was kept secret until it was enacted — outlaws certain political views, even if expressed peacefully.
Any promotion of independence or greater autonomy appears to be banned by the legislation. Another vaguely worded provision bans inciting hatred towards the Chinese or Hong Kong government.
On the authoritarian mainland, similar national security laws are routinely used to crush dissent.
The new security law and the removal of books raises questions of whether academic freedom still exists.
Hong Kong has some of Asia’s best universities and a campus culture where topics that would be taboo on the mainland are still discussed and written about.
But Beijing has made clear it wants education in the city to become more “patriotic” especially after a year of huge, often violent and largely youth-led pro-democracy protests.