Aberdeen manager Derek McInnes has been impressed by his performances in recent weeks and has rewarded the 22-year-old with a new contract.
The Northern Ireland international is one of eight Aberdeen players whose contracts expire in the summer.
Magennis said: "I have never hidden my desire to remain at Aberdeen so I am delighted to put pen to paper on a contract extension.
"It is a great club, with a unique set of fans and I hope next season I can repay the faith shown in me by everyone associated with Aberdeen FC.
"The squad is already looking forward to the season kicking off and I am certainly determined to play my part in bringing success back to Aberdeen."