The judge ordered that recording at the studio/warehouse is restricted to between 9 a.m. and 5 p.m. on the first floor.
The building cannot be used for residential living and debris, clothing and toiletries must also be cleaned up. City attorneys said they suspect people may be living here, even though the building is not zoned for that purpose.
The judge also ordered that a corridor that could trap a firefighter during a fire must be sealed. The judge issued the order after seeing photos of inside the building.
City inspectors were granted permission to enter the building last week.
On Tuesday, Chicago officials presented evidence of electrical, structural and safety issues inside the building, as well as alleged proof people have been living in the building.
In response to the judge's order to restrict hours, R Kelly's attorney, Melvin Sims, argued that the creative process shouldn't be restricted to traditional business hours.
"When we were out there last week, we did find bedrooms with bathrooms and toiletries and robes, and it appeared that people were living at the property," said Kimberly Roberts, an attorney for the city of Chicago.
Both parties are scheduled to return to court on Feb. 7 to update the judge.
Last week, Sims described the inspection as "uneventful" and said it debunked previous concerns that someone may be living in the studio, which is not zoned for residential use.
WATCH: Timeline of R. Kelly sex abuse allegations
"There is no one that lives at that premises nor has anyone or is anyone living at the premises," Sims said on Wednesday. "No one lives there."
The studio/warehouse is rented by R Kelly and was featured in the recent docuseries "Surviving R Kelly," that details decades of accusations of sexual misconduct and abuse against the singer.
The building is for sale and Kelly is facing eviction due to unpaid rent.
Roger Romanelli, executive director of the Fulton Market Association, said some of his members had not been happy with the tenant.
"Two years ago, we had concerns about weapons being carried around in public and tour buses taking up precious public parking," he said.
Romanelli said those issues have been addressed and hopes the city's attention on the building will be good for everyone in the area.
"They have to be safe, they have to follow the law, and especially on this building, we welcome the city's oversight," he said.