About 20 people occupied the building to call attention to the plight of homeless San Franciscans.
"It's empty and we have a lot of homeless families and people in San Francisco," Miguel Carrera from Creative Housing Liberation said.
The homeless advocacy group held a rally on Sunday at Civic Center Plaza and marched to the vacant property. Soon after, they hung banners and said they were reclaiming the space.
The building, the Leslie Hotel, was used as a dormitory by the California Culinary Academy students for 11 years until the school's lease expired in 2008.
The owner, John Chiatello, said that was the same month the bottom fell out of the real estate market and he has been unable to find buyers or renters for the space.
"We've had the building up for sale and have talked with various agencies about the building, but no one has any money, so we've had to hold the building," he said.
The San Francisco Police Department tactical squad broke the locks on the building and searched the 68 units room by room and a team of about 15 officers went in to make arrests.
Earlier in the morning ABC7 noticed two or three protesters still inside, their faces covered with black bandanas. They peered out of windows with banners reading "no home, no justice, no peace" and "Empty homes are for people too." By the time police finished their search, it was obvious the demonstrators had carried out an exit strategy.
"They exited out the back, over the roof or the back and they had a pre-exit strategy for leaving the premises," SFPD Captain Joe Garrity said.
"Is it fair to the landlord? I don't know if it's fair to the landlord. It's certainly not fair to the 6,000 people who are homeless," homeless advocate L.J. Cirilo said.
Police briefly detained two men they say had jumped from the roof and down a stairwell, but they could not determine if they were actually inside the building, so they were not cited.
Garrity says the biggest concern was public safety because the protesters turned on the electricity and natural gas in a building that has stood vacant for two years.
Activists said they have occupied three other vacant properties this year.