He removed Brownlie with the last ball of the 26th over before taking the prized scalp of Black Caps wicketkeeper BJ Watling (0) with the first ball of his next over.
McEwen completed the hat-trick when Daryl Mitchell edged one through to keeper Ben Horne for a golden duck.
Tim Seifert came to the crease and he and Cooper rebuilt the innings at a good clip.
Cooper looked assured on a pitch where he has had a lot of success. His last first class outing at Eden Park Outer Oval reaped him his maiden first class century (101) and a second innings 83.
He brought up his half-century off 119 balls.
Cooper was eventually dismissed for 60, caught behind off McEwen. He faced 143 balls and struck nine boundaries.
Northern Districts were 218/7 at tea on day two, 121 runs behind Auckland's effort of 339.