The 31-year-old, capped 80 times by Italy, spent seven years at Juventus before joining Milan for one season.
The move is set to be part of a deal that will take Argentina forward Gonzalo Higuain in the opposite direction from Juve to Milan.
Higuain will also undergo a medical on Thursday, Milan said on Twitter.
World Cup Qualification UEFA
Berardi on target as Italy cruise past Northern Ireland
Bonucci's return to Juve would reunite him with Andrea Barzagli and Giorgio Chiellini, who together formed the so-called 'BBC' defence, which proved to be one of Europe's most formidable rearguards.
Juve defender Bonucci excused by Pirlo after nightmare match
Italy stand-in coach loses count of absentees for Poland match