McInnes has been in charge at Pittodrie since 2013 and guided the Dons to League Cup glory the following year. The Dons have reached a number of other cup finals during his reign and finished runners-up to Celtic in the Premiership four years in a row.
Chairman Stuart Milne told the club website: “I think everyone recognises what Derek has achieved during his time at the club and I am delighted he has agreed to extend his time at Pittodrie, making him our longest-serving manager since Sir Alex Ferguson."
McInnes added: "With the opening of our new training campus at Kingsford on the horizon I am excited about the prospect of training professionally in a modern facility, something which should be in keeping with the ambitious club we are.
“It’s no secret that I love working for this club and I will strive to continue to try and create those special moments for our supporters. Working closely together I believe this is possible."