"Nineteen people have been arrested so far," a source close to the investigation told AFP, adding that a total of 23 people were targeted by police in the operation.
Among those arrested was Cesar Montana Lehmann, the leader of Madrid-based band Def Con Dos, who goes by the stage name Cesar Strawberry, the source added.
The Interior Ministry said in a statement on Tuesday that the Civil Guard had launched an operation called "Spider-III", detaining suspects across Castile and León, Catalonia, Galicia, Madrid, the Basque Country and Valencia.
Def Con Dos, which has been influenced by US hip-hop bands Beastie Boys and Public Enemy, makes many references to pop culture, news and cinema in its lyrics.
Award-winning Spanish director Alex de la Iglesia used music by the band in his 1993 black comedy film "Acción mutante" ("Mutant Action") about a terrorist group made up of disabled people.
Those arrested were accused of making comments online that defended organizations like Basque terrorist group Eta, Grapo (First of October Anti-Fascist Resistance Groups), and Catalan separatist group Terra Lliure.
The suspects also allegedly wrote messages humiliating and insulting victims of terrorist acts, mocking the physical injuries that they suffered. Some comments praised the killing of Civil Guard members by Eta as well as the killing of the Basque Autonomous Police.
One post said "We want to kill more civil guards...like Grapo".
Others wrote posts saying they wanted to kill "mayors, ministers, judges, police and business people".
A threatening message against King Felipe VI said that Queen Letizia could be "the new Jacqueline Kennedy," implying that she could be widowed.
Yet another post made a threat to kidnap former prison officer José Antonio Ortega Lara, who had been kidnapped by Eta between 1996 and 1997.
The Spider-III operation was a continuation of two previous investigations last year, which in total saw 40 people arrested after comments online threatened politicians like Prime Minister Mariano Rajoy and current Madrid mayoral candidate Esperanza Aguirre.
Newspaper El Pais reported that the Civil Guard expects to arrest up to 30 people in the most recent operation.
Most of those arrested so far on Tuesday afternoon had come from the Basque Country.