A Casemiro penalty cancelled out a first-half strike from Jesse Lingard to leave the two teams level at the end of normal time, but it was United that triumphed 2-1 on spot kicks after seven players missed in the shootout.
Madrid boss Zinedine Zidane selected a strong first XI, with Gareth Bale, Karim Benzema, Toni Kroos and Luka Modric all included, while Nacho was selected at the heart of the defence alongside Raphael Varane.
As for United, the likes of Timothy Fosu-Mensah, Phil Jones, Matteo Darmian and Andreas Pereira were given spots in the team, but Romelu Lukaku, Paul Pogba and Henrikh Mkhitaryan all started on the bench.
It was Real Madrid that had the first sight of goal in the fifth minute of action, but United goalkeeper Sergio Romero did well to punch clear a cross from Benzema, which initially looked to be finding Bale.
Lingard then came close for the Red Devils down the other end, with the England international forcing a smart save from Los Blancos goalkeeper Keylor Navas after releasing a powerful strike from a central position.
United had more of the ball in the opening 20 minutes of action, but Madrid were a serious threat on the counter-attack, and Fosu-Mensah, who impressed at right-back, had to make a couple of excellent clearances under pressure from Bale.
A water break was called just past the 30-minute mark as both sets of players took on some much-needed fluid on what was a blistering afternoon, and the tempo dropped in the latter stages of the first period.
Lingard fizzed one just wide of the Real Madrid post in the 42nd minute after another quick counter-attack from the Red Devils, but the Englishman was not to be denied in stoppage time at the end of the first half - converting at the far post after Martial had shown excellent feet to dance into the Real Madrid box before picking out his teammate.
As expected, both managers made wholesale changes at the interval, with Ander Herrera, David de Gea, Lukaku, Pogba and Mkhitaryan among those to enter for Man United, while Theo Hernandez came on for his Real Madrid debut after a summer move from local rivals Atletico.
Fellaini, who was one of three United players to start the second period after featuring in the first, had a half-chance to double his team's lead just past the hour, but the Belgian midfielder headed a Mkhitaryan corner over the crossbar.
Real Madrid were level in the 69th minute, however, when Casemiro scored from the penalty spot after Victor Lindelof had brought the speedy Theo Hernandez to the ground with a rash challenge inside the Man United box.
Luismi Quezada almost sent Los Blancos ahead in the 72nd minute after curling a clever free kick towards the top corner, but De Gea was on hand to make a smart save as the match stayed level.
Fellaini should have scored Man United's second in the 83rd minute after a wonderful cross from Scott McTominay found the Belgian free inside the Real Madrid box, but the midfielder ballooned the ball over from close range.
Real Madrid ended the second period on the front foot, but the Champions League holders could not find a second despite a number of half-chances, and the International Champions Cup fixture went to penalties in order to determine a winner.
Incredibly, seven of the 10 players that took penalties - including Martial, Lindelof, Kovacic and Theo Hernandez - failed to convert, and successful spot kicks from Mkhitaryan and Daley Blind proved enough for Man United to triumph after Casemiro smashed the crossbar with Real Madrid's fifth effort.
Next up for Los Blancos is a fixture with Manchester City on Wednesday, while United will continue their preparations for the new campaign with a clash against Barcelona on the same night.