Workers against the move earlier blockaded roads to "Dolly", a seedy district of narrow lanes where women are famously touted in shop windows of old crumbling buildings in Indonesia's second-biggest city.
Protesters covered their faces with black cloths emblazoned with slogans rejecting Dolly's closure and banged pots and pans together.
"Fry Risma! Fry Risma!" they shouted, using the nickname for Surabaya mayor Tri Rismaharini, who spearheaded the closure and put it high on her administration's agenda.
A declaration read by 160 residents in favour of the closure said: "To take firm action against human traffickers, those committing indecent acts and the use of buildings for immoral activities, we the people in this area... want development for a place that is safe and in order."
Authorities said around two dozen brothels could continue to operate until Eid in late July, at the end of the holy Islamic fasting month of Ramadan.
There are an estimated 1,400 sex workers in Dolly's brothels and authorities are offering them around five million rupiah ($420) each and occupational training to give up their jobs.
The name Dolly is believed to come from a Dutch madam who ran a brothel in the city during the Netherlands' colonial rule of Indonesia.
The administration reportedly hopes to transform the district to a shopping strip that will include bakeries and handicraft stalls.
The closure was welcomed by Islamic leaders, who have for years pressured authorities to shut down Dolly. But they threatened violence earlier Wednesday if brothels remained open after the deadline.
During a mass prayer session, Islamic preacher Azis Aris told some 600 Muslims from a group called the Muslim Brigade that they must enforce the closure.
"We don't need knives or sticks. We'll just come with the name of Allah and enforce (Islamic) sharia law, which punishes with death by stoning," Azis said.
A 38-year-old sex worker who calls herself Yuni said the government's proposed compensation or wages from other employment options would unlikely be enough to pay for her two sons' education.
"I want to see my sons be successful, and only then will I be happy. So don't tell me to stop because I'll come back to the right path when it's time," said Yuni, who has been a sex worker for 15 years.