Police officers armed with batons and pepper spray quickly moved to block protesters from holding a rally, arresting dozens of them, sometimes by using force.
The following video footage by an RFE/RL correspondent shows police dragging several people away in police vans.
An RFE/RL correspondent saw some demonstrators throw stones at police officers who were chasing protesters.
The hijab ban announced late last year has sparked a series of public protests in Azerbaijan.
In December, several thousand people taking part in a ceremony marking the Shi'ite holiday of Ashura chanted slogans against the ban
The authorities say the ban is part of an attempt to restore Soviet-era school uniforms to public education.
There is no law that specifically prohibits the wearing of hijab in schools. Rather, the Education Ministry cites the Law on Education, which requires students to wear uniforms.
"Outside the school everyone is free to wear whatever they want," Education Minister Mardanov told a news conference in December.
Some Muslim groups in Azerbaijan have demanded the Education Ministry reverse what is in effect an unofficial ban, calling it unconstitutional.
The Constitution of the Azerbaijan Republic guarantees the freedom of religion. Read more in Azeri