The militias are holdovers from the 2011 uprising that ousted dictator Muammer Gaddafi and are a powerful force in the increasingly lawless North African country.
"Fifteen dead and 95 wounded, several of them seriously, have been admitted to Tripoli hospitals," a health ministry spokesman said.
He was unable to give a breakdown between those killed in the demonstration and those who died in a subsequent assault on the militia headquarters.
Violence erupted when gunmen fired at hundreds of demonstrators carrying white flags from inside villas in the southern Tripoli district of Gharghour where the Misrata militia has its headquarters.
Also Read
The shooting sparked a violent response in which armed men assaulted the villas and set them on fire.
A witness, who identified himself only as Ibrahim, said "most of the members of the militia barricaded themselves inside one single villa."
He later said the militiamen had evacuated the final villa and fled, adding that some militiamen had been wounded and others arrested.
Other witnesses said heavy gunfire could be heard in Gharghour and that smoke was rising from the district.
"Tensions are on the rise in Tripoli. We're going to announce a general strike and launch a civil disobedience campaign until these militias leave," he said.
In sermons at weekly Muslim prayers earlier in the day, imams backed the call to protest against militias issued by the town hall as well as Libya's mufti, the highest religious authority.