The rally on Saturday in Lobito, capital of Benguela province, was staged in protest against the detention of rapper Luaty Beirao and 14 others on charges of “rebellion and a coup attempt”.
The 18 men arrested at the event are expected to appear in court on Thursday or Friday, their lawyer David Mendes said.
“The attorney general of the province accuses my clients of disturbing public order,” Mendes said.
“They are unable to receive visits from their families or their lawyers.”
Beirao ended a five-week hunger strike last week following pleas from his family.
He was detained on June 20 along with other opposition activists accused of plotting against President Jose Eduardo dos Santos, who has been in power since 1979.
Rights groups say activists and journalists are increasingly targeted by the government.
The police declined to comment on the latest arrests.