Law said he left the city because he wanted to continue the protest movement's advocacy work on the international stage.
He did not say where he had gone, noting only that he would not reveal too much about his personal whereabouts and situation, and does not know when he will return to Hong Kong.
Law is one of the most famous protest leaders to come out of Hong Kong's 2014 demonstrations, which shut down parts of central Hong Kong for more than two months.
Law's oath was deemed "insincere," ending his term in parliament.
The new security law dramatically broadens the powers of local and mainland authorities to investigate, prosecute and punish dissenters.
Critics say the law has stripped Hong Kong of its autonomy and precious civil and social freedoms. The Chinese and local governments argue it's necessary to curb unrest and uphold mainland sovereignty.
Wong and other activists have met with foreign diplomats and testified before the US Congress since large-scale pro-democracy protests broke out in vast numbers last summer.
After the new law went in effect on Tuesday night, Law testified via video conference before a US congressional committee hearing.