The two Sky Bet Championship clubs agreed a fee of £5.5million for the 24-year-old on Wednesday following weeks of negotiations.
After passing a medical on Tyneside on Thursday morning, the Scotland international has now sealed his switch to St James' Park.
Hanley arrived at Ewood Park in 2008 to join the Rovers academy and after making his first-team debut two years later he made over 200 appearances for the club.
Newcastle boss Rafa Benitez has been busy reshaping his squad following the club's relegation from the Premier League in May.
Hanley is the sixth arrival this summer, following Matz Sels, Jesus Gamez, Matt Ritchie, Issac Hayden and Dwight Gayle to Newcastle.
Papiss Cisse and Andros Townsend are among the players to have left the club following their relegation from the Premier League, while Liverpool have agreed a fee in the region of £25million for Georginio Wijnaldum.