The 24-year-old played alongside Rabiot in France’s Nations League semi-final against Belgium last Thursday, scoring a 90th-minute winner.
Rabiot was ruled out of the final after testing positive for Covid, but Hernandez played the full 90 minutes in the world champions’ 2-1 triumph over Spain.
“Theo Hernandez, who has returned from the national team, has tested positive for a swab carried out at home,” Milan said in a statement. “The relevant local health authorities have been informed and the player is doing well.”
Milan, who sit second in Serie A, host Hellas Verona on Saturday.