The Dons duo, who combined to salvage a point at Crawley last weekend, both netted after the break at Stadium MK.
The hosts could have taken an early lead inside five minutes when Grigg played a neat ball through to Dean Bowditch, but Barnslety goalkeeper Ross Turnbull got down well.
Milan Lalkovic had the visitors first effort on goal four minutes later after an MK Dons offside trap failed, but David Martin was able to punch clear.
The Dons took the lead just before the hour-mark thanks to Alli’s 12th goal of the season.
The 18-year-old got the ball excellently under control on the edge of Barnsley’s area before smashing a left-footed strike past Turnbull and into the bottom corner.
Grigg grabbed the Dons’ second in the 63rd minute after rounding Turnbull before tapping home into an empty net.