The University of Zambia said it had no dress code and it would not "tolerate old discredited misogynist views".
In a statement, university librarian Christine Kanyengo said the notice did not reflect the views of the library's management.
"We would like to unreservedly apologise to our female library users for any offence caused," she said.
Third-year student Dikina Muzeya, who had criticised the new rule, told the BBC she welcomed the apology.
"The library management should be more conscious about notices that are published, especially notices involving restrictions, such as dress code, on a particular sex," she said.
Male student Killion Phiri had welcomed the ban when it was imposed.
"How can you concentrate on studying when someone walks in a mini-skirt or a tight dress?" he said.
-BBC