The Eredivisie side will now head into the last 32 of the Europa League having claimed a considerable scalp courtesy of goals from Demy de Zeeuw and Toby Alderweireld.
Milan were already assured of second place in the group but had goalkeeper Marco Amelia to thank for keeping the total down in this match.
Ajax, under the stewardship of interim boss Frank de Boer after Jol left on Monday, almost got off to the perfect start, Luis Suarez finding room to shoot after just 90 seconds and drawing a smart save from Amelia in the Milan goal.
Amelia had plenty more to do in the opening 10 minutes, first plucking a dangerous Gregory van der Wiel cross out of the air and then parrying Miralem Sulejmani's goalbound 20-yarder.
Milan continued to invite the visitors to attack, though both Christian Eriksen and Van der Wiel failed to hit the target with ambitious attempts.
The Italians introduced Kevin Prince-Boateng after just 26 minutes following an injury to Mathieu Flamini but that did not turn the tide.
Instead, Eriksen produced Ajax's best attempt yet, curling the ball right-footed towards the top corner only to be denied once more by the diving Amelia.
There were just 10 minutes remaining in the first half when Milan finally rallied, Ronaldinho heading straight at goal from 12 yards and then seeing a drilled attempt charged down by Jan Vertonghen.
Ajax had one more shot before the interval, but Amelia was not deceived by Suarez's 30-yard drive.
Amelia somehow denied Suarez again three minutes into the second period, blocking the Uruguayan's close-range effort from a corner.
Andrea Pirlo, previously anonymous, started to come to life, first taking a first shot on goal and then crossing for Thiago Silva who shot wide.
Sulejmani and Suarez tested the excellent Amelia again before De Zeeuw finally put Ajax in front in the 57th minute.
He followed up Siem De Jong's blocked shot from the edge of the area and finally found Amelia unable to prevent the goal.
After 65 minutes it was two, Alderweireld sweeping home Suarez's pass from the left as Milan's defence faltered.
Substitute Zlatan Ibrahimovic made a difference for the home side, bringing two fine reaction saves from Maarten Stekelenburg in the space of five minutes.
Both goalkeepers continued to excel as the match drew to a close, while Ibrahimovic somehow lifted his shot over the crossbar from six yards in the final minute.
AC Milan 0-2 Ajax: Match Report - view commentary, squad, and statictics of the game as it happened.