The 25-year-old centre half joins the Carrow Road club having played just once for the Magpies this season, in the Carabao Cup defeat to Nottingham Forest last week.
Scotland international Hanley, who joined Newcastle from Blackburn Rovers in July 2016, made a total of 17 appearances during his 13 months at St. James’ Park, scoring once against Queens Park Rangers.