The move will conclude the 39-year-old Croatian midfielder's 13-year spell at Real Madrid.
Modric, the 2018 Ballon d'Or winner, is set to join a Milan side looking to rebound from a disappointing season where they finished eighth.
Allegri, returning for his second stint as Milan manager, also outlined squad changes, including the sale of Tijjani Reijnders and the potential departure of Theo Hernandez.
AC Milan will commence their Serie A campaign on 23 August with a home fixture against Cremonese.