The defender – who had been captain at Ewood Park – has signed a five-year deal at St James's Park.
"I'm over the moon and delighted to be here," said Hanley.
"It is a fantastic opportunity to come and play at such a big club, and one that I couldn't turn down.
"It is an exciting step in my career, but it doesn't stop there. This is just the start, and I am looking forward to helping Newcastle get back into the Premier League."
United manager Rafa Benitez said: "I am very pleased to bring Grant Hanley to our project to add his hard work and potential to our squad.
"It was clear that we needed another central defender and we were seeking someone with good experience in the Championship.
"Grant is a young player with a lot of ambition to improve and keep growing with us. He is also a strong defender, fast and with personality, a player that surely will increase competitiveness in his position."