The 25-year-old, who can also play in midfield, joined the Dons from Inverness Caledonian Thistle in 2015.
He has since made more than 70 appearances for Derek McInnes's side.
Shinnie told the club website: "We've a squad that is capable of winning trophies and that's what I aim to do while I'm an Aberdeen player."
The manager described Shinnie's decision as being "as important as any signing we will make" in the transfer window.
"As an Aberdeen boy, his love for the club is evident," said McInnes.
"Graeme is very protective of his career I know he sees Aberdeen as the club to develop his game and this sends out that message.
"He's been excellent since joining us two years ago and we know there is more to come from him."
Aberdeen defender Graeme Shinnie has signed a new contract which will keep him at Pittodrie until at least the summer of 2019.