In a recording of the speech leaked to RNZ, Brewer can be heard declaring himself a "glass ceiling breaker" to laughs from the crowd.
"I'll be the first male MP for Upper Harbour," he says to cheers. "Stale, pale males are back!"
An audience member shouts in response: "Stale, pale, male!"
The comments come as National faces scrutiny for a lack of diversity in its new caucus, and follow a public commitment from leader Christopher Luxon to improve representation.
Almost 70 percent of National's caucus this term are men, and 80 percent are Pākehā.
The Upper Harbour electorate had been held by Walters - New Zealand's first Sri Lankan-born MP - since 2020, and before that, National's Paula Bennett since the seat's formation in 2014.
Contacted by RNZ, Brewer said the remarks were intended to be funny and self-deprecating but accepted they were unwise.
"If anyone is offended by this comment, of course, I apologise... I don't want to be the subject of distraction," Brewer said.
"In my defence, it was a private function, but nonetheless, it was a silly thing to say. It was clearly a poor attempt at humour, and it's something I wouldn't say again."
"It was an exciting election night victory. We were all a little bit excited. And hence, my speech possibly went off the core message of gratitude.
"It's a lesson for a first-term MP that even if you're in a private function, cracking jokes, you've just got to be ultra careful as to what you say."
Brewer said he "absolutely" supported his leader's stated drive to improve diversity within the National Party.
"That is something I clearly support, if you look at all my work in local government, in and around business advocacy [and] community leadership in different roles over the last 20 years.
"I've helped as many candidates as I can, all around Auckland, of various ethnic heritage and backgrounds."
The small private function was held at the Massey Rugby Football Club at Moire Park in West Harbour.
Luxon has talked at length about the need for National's caucus to more closely reflect the make-up of New Zealand, sending a direct message to party faithful last year that he wanted them to front more diverse candidates.
Despite that, Upper Harbour's local members selected Brewer as a candidate ahead of the four other contenders on the shortlist, all women, including now-ACT MP Parmjeet Parmar.
Most recently a communications consultant, Brewer spent six years as an Auckland councillor from 2010 to 2016.
Before that, he led the Newmarket Business Association for five years, and worked as a press secretary for former ACT leader Rodney Hide, former Auckland Mayor John Banks and former Opposition leader Jenny Shipley.