The 25-year-old, who moved north from Celtic last summer, has enjoyed an impressive first season in the Granite City - netting 22 goals to earn an SPFA player of the year nomination.
"I didn't come here just to play out the time on my contract, I am here to help bring back some silverware to the club," he said.
"I would also like to thank the supporters who have welcomed me to the city and given not only me but the team fantastic backing this season."
Manager Derek McInnes added: "As far as I am concerned Niall is going to be the big summer signing for Aberdeen.
"Hopefully this sends out the correct signal to not only our supporters but also to any other players who are potentially thinking about signing for this great club."