Blackburn were demanding £6m for the defender but have accepted Newcastle's offer of £5.5m, it is understood.
The 24-year-old defender who has played all his professional career for Blackburn has made 201 appearances for the Championship side, scoring nine goals.
Hanley also has 23 Scotland caps to his name and has scored one international goal.
Newcastle will be hoping the signing of Hanley will help them win promotion back to the Premier League after the Magpies were relegated last season.