The Red Devils' winning run was ended by the Italian side in normal time, but they held their nerve from the spot by converting all five of their pens.
United end pre-season unbeaten after winning all five of their previous matches, while Milan have yet to win in three games under new boss Marco Giampaolo.
United started with a 4-2-3-1 formation of sorts, with Rashford on the left and Anthony Martial through the middle.
Rashford was the most involved of United's attacking quartet and, after having a swerving shot kept out by Gianluigi Donnarumma, he opened the scoring with a fine goal.
The England international cut inside from the left, taking the ball past two opposition players and guiding the ball away from Donnarumma with the aid of a deflection off Alessio Romagnoli.
Suso was the only player looking likely to make an impact for Milan, meanwhile, and like Rashford it took him a couple of goes before he found his range.
After coming within inches of scoring a world-class goal from 25 yards, the ex-Liverpool man pounced on a stray pass from Nemanja Matic and picked out the bottom corner from the opposite side a minute later, with David de Gea unable to get across.
Milan ended the first half on top and forced De Gea into another couple of saves through Suso and Krzysztof Piatek, the latter nearly finding a way through with his chipped shot from an angle.
Piatek then missed a glorious opportunity early in the second period when played clean through by Hakan Calhanoglu, opting to take the shot on early rather than carry it forward.
Lindelof tested Donnarumma with a glancing header, but a few minutes later he put the ball into his own net.
Samu Castillejo flicked the ball on with his head and it hit Lindelof on its way past De Gea.
Milan, beaten in their first two pre-season friendlies, were unable to hold on and United were on level terms 12 minutes later when substitute Lingard took Martial's pass in his stride and shot across Pepe Reina in the far corner.
Lingard could have won the match for United right at the end, only to shoot right at Reina after doing the hard work by creating some space for himself.
United prevailed on pens, however, as they scored all five of theirs - James netting the winning fifth after Daniel Maldini, son of legend Milan legend Paolo, saw his attempt saved by De Gea.
MANCHESTER UNITED (4-2-3-1): De Gea; Wan-Bissaka (Young 65'), Lindelof, Rojo (Tuanzebe 65'), Shaw; Matic (Fred 65'), McTominay; A. Pereira (Lingard 65'), Mata (James 64'), Rashford (Gomes 82'); Martial (Greenwood 82')
AC MILAN (4-3-1-2): G.Donnarumma (Reina 64'); Calabria (Conti 77'), Romagnoli (Brescianini 77'), Musacchio, Rodriguez (Strinic 77'); Borini (Gabbia 77'), Biglia (Krunic 64'), Calhanoglu; Suso (Bonaventura 77'); Castillejo (Silva 64'), Piatek (Maldini 77')body check tags ::