The 24-year-old, a Germany international who predominantly plays at centre-back, becomes the Magpies' third first-team addition of the summer.
Malick racked up 85 appearances in all competitions during his three-year spell with the Rossoneri, including one against Eddie Howe's side at the San Siro in the UEFA Champions League.
His only goal for Milan came in Europe's elite competition last season, finding the target in a 3-1 victory away to Real Madrid.
Malick began his professional career with homeland side Schalke 04, where he progressed through the youth system before making his Bundesliga debut as an 18-year-old in 2020. The defender has three Germany caps to his name at international level.
Malick will wear shirt number 12 for Newcastle United this season.
Malick said: "I'm really excited to join this massive club. I can't wait to start training and to get to know my new teammates and all the staff.
"The gaffer showed me his vision and what he wants to do with me as a player and the club itself, which is really exciting.
"I think Newcastle speaks for itself. It's a great club, a big club with passionate fans who I can't wait to see at St. James' Park."
Newcastle United head coach Eddie Howe added: "We're really pleased to have Malick on board. He's a player I've admired for a long time and somebody who will add real quality to our defensive options.
"Malick is still young but brings valuable experience of Champions League football, as well as playing in the Bundesliga and Serie A, which is a major positive for us as we return to Europe this season."