Milan started the game aggressively and kept up the intensity throughout the first half, but despite a number of chances could not beat Empoli goalkeeper Guglielmo Vicario.
Rafael Leao could have sent Milan into an early lead in the ninth minute with a low shot from inside the box, but Vicario was down fast to save with his legs.
Manager Stefano Pioli's injury woes continued when winger Alexis Saelemaekers needed to be substituted in the 33rd minute. Only three minutes later, right back Davide Calabria needed to be carried off the field on a stretcher after a knock. Simon Kjaer also needed to go off in the 73rd minute due to an injury.
"Calabria and Kjaer have muscular injuries, Calabria's is pretty serious. Saelemaekers looks like a sprain of the collateral ligament, we'll see what the tests say," Pioli told Sky Sport Italia.
"Injuries happen over the course of a season, but I am fortunate to have many talented players who all have the right attitude and feel they are within the project."
Ante Rebic managed to break the deadlock in the 79th minute with a controlled shot inside the area after being played in with a great pass from Leao.
Nedim Bajrami thought he had rescued a point for Empoli two minutes into stoppage time with a goal from a free-kick, creating euphoria among the home fans.
Leao made sure of the win when he scored Milan's third in the seventh minute of stoppage time with a beautiful chip over Vicario.
"It was a strange, intense game, we should've scored earlier, lost our way after the injuries and then got back on track. It was a victory of hunger and spirit," Pioli said.
Empoli are in 14th place with seven points. Milan travel to play Chelsea on Wednesday in the group stage of the Champions League.