The Scotland international, whose transfer fee is believed to be between £10m and £12m, replaces Andros Townsend in the Magpies' squad following the England winger's switch to Crystal Palace.
Ritchie is the third new arrival at St James' Park this week, following on from goalkeeper Matz Sels and striker Dwight Gayle, as boss Rafa Benitez prepares for next season's Sky Bet Championship campaign.
The 26-year-old, who began his career with Portsmouth, joined the Cherries from Swindon Town for £400,000 in January 2013 and went on to make 142 appearances for the club, scoring 31 goals and recording 29 assists.
He helped them win promotion from League One and the Championship and played a key role for them in the Premier League last season.
After completing his move to Tyneside, Ritchie told Newcastle's official website: "It's an unbelievable feeling to come to a football club like this.
"I loved it at Bournemouth - I had a fantastic time there and it had a huge impact on my career. But when a club like Newcastle comes calling, I couldn't pass up this opportunity.
"It's fantastic to be here and I'm really looking forward to the challenge of getting the Club back in the Premier League."
Benitez added: "We have been following some wingers for a while and Matt was one of the best prospects for this team.
"He has great ability and pace, and as soon as we knew that Andros Townsend could be leaving, our priority was to finalise this deal.
"We have signed an exciting winger who has experience in the Championship but has also proved that he can step up to the top level. I am delighted that he is now part of our squad."