Ford is accused of not declaring a conflict of interest when he gave a speech and participated in a council vote last February to strike down a recommendation that he repay donations he solicited using official city letterhead for his private football foundation.
"I believe in my mind, in a conflict of interest, the city benefits and the councillor benefits," Ford told Justice Charles Hackland in a packed Toronto courtroom.
"It takes two parties to have a conflict. In this case, there was only one party. The city did not benefit."
During the hours-long testimony, Ford admitted that at the time, he didn't think he had violated any rules when he used his staff to help him stuff envelopes and address them to 11 potential donors.
But he added that the envelopes and stationary had been paid with his personal account.
"I believe I didn't do anything wrong," said Ford.
But the city's integrity commissioner, Janet Leiper, had found Ford's actions broke the conduct code for councillors.
She recommended Ford pay back $3,150 to the donors, many of whom were lobbyists who often did business with the city.
Council adopted the commissioner's findings and sanction in a resolution Ford voted against — but he never made the repayments, despite several reminders from the commissioner.
Under cross-examination, Ford said he doesn't remember receiving or reading a handbook for municipal councillors that outlines when to declare conflict of interest or the Municipal Conflict of Interest Act, which he is accused of breaking.
He also admitted he didn't attend an orientation meeting when he was first elected city councillor in 2000.
Just before the council vote in February, Ford gave a passionate speech about his charity, which buys football equipment for at-risk high school students in Toronto.
The mayor told the court he found that meeting "confusing," adding that the city solicitor or the city clerk usually would have pointed out when a motion was a conflict of interest for a councillor.
This was not done at the meeting, said Ford, and if it had been, he would have excused himself from the vote.
Ford testified that following the commissioner's decision, he sent letters to the 11 donors offering to pay their money back.
Some had refused the reimbursement, while others did not respond, he said.
"Why would I have to pay it out personally?" he retorted during cross-examination.
"I didn't touch the (foundation) money. I never touched the money."
Paul Magder, a Toronto resident, launched the lawsuit last March.
If found guilty, Ford could be ousted from office and barred from running for city council for seven years.
However, there's a chance Ford could hold on to his seat even if found to be at fault, provided the judge finds that Ford made a mistake or experienced a lapse in judgment.
Lawyer Clayton Ruby, whose client filed the lawsuit, told the court that Ford's actions were not made "honestly and (in) good faith."
"The issue is the integrity of what Rob Ford did," said Ruby.
The case is not about the merit of the football charity or the good it has done for at-risk children, but whether this was one of Ford's many "acts of persistence and ultimately successful defiance," he said.
At one point, he asked Ford if he was embarrassed by how often he was criticized.
"I'm not embarrassed about my job or what I do," replied Ford.
The mayor's lawyer, Alan Lenczner, argued that the case is about a single issue and not an "inquiry" into Ford's political career.
Lenczner told the court the integrity commissioner's original sanction is void because ordering Ford to repay the donations was out of her jurisdiction.
Trevor Farrow, a legal ethics expert at York University's Osgoode Hall Law School in Toronto, said the conflict-of-interest rules were designed to allow for human mistakes while "setting a fairly high standard to protect an important institution, which is our municipal government structure."
"It'll be key what evidence is given at that hearing in terms of what the mayor knew or should have known, in terms of this notion of inadvertence, ignorance or an error in judgment," he said.
When someone is found to have knowingly breached the spirit and letter of the rules, "the act does not give a lot of discretion to the court in terms of remedies," Farrow said.
"Will (Ford) lose his seat? I really don't know ... Is it a possibility? Yes, it's a possibility," he said.
The hearing continues Thursday.
Also on HuffPost