Free agent Mandzukic, 34, who retired from international football after losing the 2018 World Cup final, returns to the Italian top-flight after four years with Juventus.
Mandzukic left Juve for Al-Duhail in 2019 but departed the Qatari side by mutual consent last July.
“The club and the striker have agreed on a deal until the end of the current season with an option to extend the contract for the next one,” Milan said.
Coach Stefano Pioli said the transfer underlined the 18-time league champions’ aspirations.
“I’m happy, he’s an extra arm in the attack. The club is ambitious again, the arrival of Mandzukic goes in that direction,” Pioli said after Monday’s win at Cagliari which allowed his outfit to retain top spot.
Ex-Sweden forward Zlatan Ibrahimovic will compete with Mandzukic for a starting spot in the side.
“We will be two to scare the opposition. Now the most difficult matches start, with more players, the coach will be able to make changes,” he said after the victory.
They have a three-point advantage over local rivals Inter Milan before hosting Atalanta this Saturday.