Milan raced into an early lead, with captain Davide Calabria poking home the ball at the second attempt after just 28 seconds.
- ESPN+ guide: LaLiga, Bundesliga, MLS, FA Cup, more (U.S.)
- Don't have ESPN? Get instant access
The hosts piled on the pressure in search of an equaliser but could not make several chances count, and Atalanta's wastefulness proved costly as Sandro Tonali raced clear three minutes before the break to double Milan's advantage.
Milan did not let up as Rafael Leao seemingly put the victory beyond all doubt with a third goal with 12 minutes to go.
Duvan Zapata got Atalanta back into the contest from the penalty spot with four minutes left, before Mario Pasalic ensured a nervy finish for Milan in stoppage time with a second goal for the hosts, but it proved too little, too late.
A sixth victory from seven league games this season for second-placed Milan helped them to close the gap with leaders Napoli to two points, while Atalanta, who finished third behind Milan last term, are eighth after their first defeat in six matches in all competitions. (Reporting by Peter Hall; editing by Clare Fallon)