The complaint against councillor Lee Vandervis was made last year by another councillor after he refused to participate in Te Pae Māori meetings and referred to mana whenua representatives on two council committees as anti-democratic.
An investigation found he breached the Code and the Dunedin City Council upheld the finding, demanding he formally apologise or face further actions.
The council has confirmed he sent a written apology on Tuesday, the day of the deadline.
"I am sorry that some of my statements and actions as an elected representative have caused offence to some for which I unreservedly apologise. Causing offence was never my intention," he said in the apology.
Vandervis said attempts were made to coerce him into making an unreserved apology by threatening to take him off out of a leadership position on a committee which added close to $14,000 to his salary.
In the debate leading up to the council's resolution, multiple councillors made it clear they wanted to remove him as chairperson of the Finance and Council Controlled Organisations Committee with one calling for his removal a year earlier, and another saying he would refuse to attend any meetings he chaired, Vandervis said.
Elected council members of Te Pae Māori - a mana to mana forum set up in partnership with mana whenua and the council - also requested he committed to participating in Te Pae meetings and observe the kawa (protocols).
But Vandervis said legal advice from Anderson Lloyd, which was sent to all elected members, concluded that request to participate went beyond the terms of Code of Conduct and was outside the council's power.
"The NZ Bill of Rights Act provides me with all the defence I need against these Code of Conduct accusations, particularly the sections relating to freedom of speech, movement, expression and religion," he said.
"For the council to attempt to remove me from an appointed chair position because I won't alienate those rights is beyond council's powers. I have not contracted out of NZ Bill of Rights freedoms because I have been elected to the DCC."
The council had requested he apologise along with "claims of alleged racism which I reject, and they have caused me reputational harm", he said.
Vandervis submitted that his apology brought the Code of Conduct process to an end.