Rob Ford visited Toronto City Hall just hours after being released from hospital, where he was recovering from surgery to remove a cancerous tumour.

The Toronto city councillor went under the knife on May 11 to remove a rare and aggressive form of malignant liposarcoma.

The surgery took 10 hours and came after months of chemotherapy and radiation treatments aimed at shrinking the tumour.

Doctors told reporters at Mount Sinai Hospital that the operation was a success, but the former mayor is facing months of recovery.

On Tuesday, Ford was released from hospital and stopped in at Toronto City Hall.

Wearing black shorts and a red T-shirt, Ford told reporters that his doctors had told him to go straight home, but that he couldn't resist a visit.

He said he'd been in a bed for 16 days, and had to get up and do something.

"I'm glad to be back and I want to thank the doctors and the nurses and everyone at Mount Sinai," he said. "They did a phenomenal job."

Ford said following his surgery, he was overcome with pain and emotion.

"For the first 10 days, I was just basically crying like a baby," he said. "It was just so painful – I couldn't get up, I couldn't do anything."

Ford also thanked his supporters, saying it was "truly remarkable" how many people reached out to him. He said he was feeling "really good" but was a little sore.

"I'm going to get back into it," he said.

His colleague, Coun. Norm Kelly, praised Ford for the strength he has shown throughout the entire ordeal.

"He has the stamina of a football lineman," Kelly told CTV Toronto. "These guys are in the trenches, play after play."

Ford was also visited by Mayor John Tory while at City Hall.

"I've known Rob Ford for a long time and we’ve had our differences, but I certainly want him to get 100 per cent better," Tory said. He added that their often competing political visions for Toronto "doesn't matter" when it comes to health.

Ford initially said he'd planned to return to work in September, but told reporters he may be back as early as the end of June.

He said he'd learned a lot from his experience with cancer: "Take every day like (it's) your last day. Be grateful for everything you have."

With a report from CTV Toronto's Natalie Johnson