The arrests are among the first since the law was imposed on the city by China on July 1, which also criminalized subversion, terrorism, and collusion with foreign forces.
Police said those arrested were three males and one female, aged between 16 and 21.
Though the police declined to name the group or those arrested, the political group Studentlocalism said on Facebook that its members were among those apprehended, naming one as former leader Tony Chung.
Studentlocalism was one of several political groups in Hong Kong which announced it was ending operations in the city due to the new security law, though it did not delete its social media pages and said activists overseas would continue their work.
In a press conference late Wednesday, police spokesman Lee Kwai-wah said the organization had "posted about the establishment of a new party that advocates Hong Kong independence on social media."
"We have to enforce the laws even if the crimes are committed on the internet. Don't think you can escape from the responsibility in cyberspace and commit crimes," Lee added.
Police said the four were being investigated under Articles 20 and 21 of the security law, which deal with secession. Under the law, secessionist offenses of a "grave nature" can result in sentences of at least 10 years and up to life imprisonment, while lesser offenses carry penalties of between three and 10 years.
On Sunday, the group published a post titled "counter Chinese nationalism, build Hong Kong nationalism," which linked to the Facebook page and recruitment forms for the "Hong Kong Studentlocalism US Division." The group's US page says it is "committed to push forward Hong Kong nationals' path of regaining our right of self-determination, and push forward Hong Kong's path towards independence."
The Hong Kong government has defended the law as necessary to protect national security, and promised that it would only affect a tiny number of people. Up until Wednesday, police had made around 10 arrests under the new law, and charged one person.
Wednesday's arrests were greeted by widespread shock online, and will renew fears of a chilling effect under the new law. They come after Hong Kong University (HKU) this week sacked law professor Benny Tai, a longtime activist and leader of the 2014 Umbrella Movement protests, in a move he said marked the "end of academic freedom" in the city.
Soon after the arrests, a CNN reporter had a source cancel an interview, unrelated to the security law, "in view of the latest development in Hong Kong."
"So students are arrested because of a SOCIAL MEDIA POST," Nathan Law, a prominent Hong Kong activist who fled the city earlier this month, wrote on Twitter. "How vulnerable a country is to be afraid of a post by a group of teenagers?"
In a statement, Sophie Richardson, China director for Human Rights Watch, said the arrests were a "gross misuse of this draconian law (which make) clear that the aim is to silence dissent, not protect national se