O'Connor represented the Police Association for two decades until he stepped down last year.
He has campaigned for Labour, citing jobs, housing and healthcare as out of reach, especially for young people.
Dunne has held the west-Wellington seat since 1984, originally as a Labour MP, but held it in the 2014 election by only 710 votes.
He had been a support partner of the National-led Government since 2008.
National's Ōhāriu-based List MP and candidate Brett Hudson asked National Party supporters to make it "two ticks for National" following Dunne's withdrawal.
Labour and the Greens originally did an electorate deal in which the Greens did not stand in order to give O'Connor a stronger chance of taking the seat, but the Green Party decided to stand a candidate at the 11th hour, with Tane Woodley joining the race on August 23.