Liverpool had previously shown interest in the 22-year-old earlier in the window and had a £10m bid rejected, but Newcastle have since been the ones to pursue their interest and get the deal over the line.
Lewis had his medical early on Tuesday morning as the Magpies looked to get the defender into their squad in time for their opening game of the 2020/21 season on Saturday against West Ham.
The Northern Ireland international becomes Newcastle's fourth signing of the summer, following the arrivals of Jeff Hendrick and Ryan Fraser on free transfers and striker Callum Wilson from Bournemouth.
Speaking to Newcastle's website, Lewis said: "It was a little bit unexpected but it was something that I was obviously looking forward to when I heard that there was serious interest, so I'm delighted to be here now.
"Newcastle's such a great club with such history and I knew it was an opportunity I would love to take with both hands."
Manager Steve Bruce added: "Jamal is a very exciting prospect. I watched him flourish in the Championship two years ago and he made a real fist of it in the Premier League last season.
"He is only 22 years old and has a wonderful future ahead of him so I hope he is a Newcastle United full back for years to come.
"It's been a great week for us with incoming players. We have had to be patient but these players improve us, which is key."
Wilson joined the club in a £20m move from Bournemouth, who were relegated to the Championship at the end of last season, while Fraser joined on a free after leaving the Cherries at the end of his contract on 30 June.
It's welcome news to fans of the Magpies who were fearing the worst ahead of the summer transfer window, after a big money takeover bid fell through after months of speculation. Lewis will fill the hole left by Danny Rose, who has left the club following the expiry of his loan deal.
Lewis made 28 appearances in the Premier League for Norwich last season and provides more youth into the side as opposed to Rose's experience. Newcastle conceded 58 goals in the league last season, which was by no means as poor as sides further down the table, but is something that must be improved upon with defensive reinforcements.