Judge Eloy Velasco in Madrid said the group were released on condition they did not leave Spain, while four others had been detained with the possibility of release depending on bail of €20,000 euros ($27,240), a judicial source said.
Police arrested the 18 Herrira leaders in raids on Monday, provoking hundreds of pro-independence supporters to come out in protest in Bilbao, the Basque region's economic capital.
The Spanish government accuses Herrira of "organizing and supporting demonstrations that praised ETA prisoners and their ideals". It argues the group replaced two other associations aiding ETA prisoners that had been banned in Spain, Askatasuna and Gestoras pro Amnistia.
Xabier Mikel Errekondo, a deputy for the independent coalition Amaiur and present at the court for the release, said Herrira "limits itself to working to defend the rights of Basque political prisoners and to support their families".
ETA is blamed for the deaths of 829 people in a four-decade campaign of shootings and bombings for an independent homeland in northern Spain and southern France.
The arrests come as ETA is under pressure to give up its arms. In October 2011 it declared a "definitive end to armed activity" but it has not formally disarmed nor disbanded as the governments of Spain and France demand.