Diame has completed his move for an undisclosed fee a day after it emerged the Tigers, for whom he scored the play-off final winner that secured their promotion back to the Premier League in May, had offered him a new three-year deal.
The Senegal international has rejected that in order to sign a contract of the same length with Newcastle, who were relegated from the top-flight last term.
"It is a great feeling to be a Newcastle player," Diame, 29, told the Tyneside club's official website.
"Everybody close to me knows how desperate I am to play in the Premier League again, but when Newcastle comes in for you it makes you think.
"I am looking to the future. Newcastle is a big name, a massive club and will be back in the Premier League, for sure."
Newcastle boss Rafa Benitez said: "Mohamed is a strong, attack-minded player with a lot of fight and determination to his game.
"He is also someone who will provide the team with goals and assists from midfield.
"He has good experience of the Championship and the fight needed to win promotion, which will be important for us."