Secretary for Security Chris Tang said people can rest assured that their rights, including freedom of expression, will be protected after Article 23 legislation comes into force before the end of next year.
Speaking on a radio programme on Sunday, Tang said the law will only target those who endanger national security, or try to undermine the safety of Hong Kong.
He stressed it will not have any impact on people's daily lives, or affect businesses or journalists' work.
"No matter whether it is the national security law, or the upcoming Article 23 legislation, we will definitely safeguard people's freedom of speech in accordance with the International Covenant on Civil and Political Rights or other international covenants," he said.
"Actually, countries around the world have their own national security legislation, so why always target Article 23 in Hong Kong? This is not fair because all societies have these kind of laws."
Tang added that the upcoming legislation will also target espionage, as existing laws are unable to tackle the current risks facing Hong Kong.
He said the unrest in 2019 was a clear sign that spying activities were rampant in the city.