More than 100 protesters picketed the Education Ministry building on Friday, demanding the scrapping of a ban on headscarves, or hijabs, in schools.
The protesters were armed with wooden poles and were holding placards saying "Freedom to Hijab!", "Stop Islamaphobia," and "Islam Will Win!"
Dozens of police used truncheons against the activists.
Several of the protesters, who resisted the police intervention, were detained.
Azerbaijan is a mainly Muslim country with deep Islamic traditions.
Azerbaijan's Ministry of Education officially banned head scarves for girls at schools.
Muslim activists have occasionally protested the ban for some time.