Mayor Erias Lukwago said he collapsed after tear gas was thrown into his car.
Police deny mistreating Mr Lukwago, a critic of President Yoweri Museveni. The opposition says the government is trying to stifle dissent.
In a separate incident, opposition leader Kizza Besigye was arrested for holding an unsanctioned rally.
Mr Lukwago was due to appear before a tribunal on Thursday for the first day of a hearing that could possibly impeach him for abuse of office.
The BBC’s Catherine Byaruhanga in Kampala says police surrounded his home and then escorted him towards the building where the tribunal was being held.
But on the way a tear gas canister was thrown into his vehicle.
Speaking from his hospital bed, Mr Lukwago told the BBC: “All I could inhale was just the smoke – it went deep into my lungs. I have a problem of high blood pressure. I collapsed there. So they picked me [up], dumped me into the waiting van and drove away at a terrific speed.”
He said that police officers hit him in the chest and tore his clothes.
“Those people were accusing me of all sorts of things – incitement to violence. They hit me in the chest, tore my shirt and treated me in a very rough manner. I tried to plead with them but to no avail,” he said.