Sulley Muntari's goal after 20 seconds gave the visitors the perfect start as the opening period was played at a frantic pace.
However, Juventus pulled a goal back through Andrea Pirlo before Sebastian Giovinco and Giorgio Chiellini gave them a cushion.
Milan were always facing an uphill battle when Philippe Mexes was sent off for a second booking 15 minutes from time, although a late Muntari second ensured that it ended 3-2.
And while he was happy with elements of his side's performance, Allegri admitted that Milan had been the masters of their own downfall.
"It was a good performance, though we made a few mistakes and allowed Juventus too many chances," he told Sky Italia.
"Both sides did well, but we made more errors than they did. On the first goal, we lost the ball in our own half and sparked a counter (and were) forced to give the free-kick. It's normal between two quality sides that a mistake will be paid for.
"I'd say overall in terms of performance that the team allowed little to Juventus, although we should have closed down their long-range shooters earlier.
"It's a long season, there is time to recover and we will do everything possible to achieve that. We'll see before the Christmas break where we are."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.