Victory for Juve in Maryland would have been enough to win the friendly competition, but after edging in front through a Dani Carvajal own goal they soon crumbled.
Gareth Bale levelled up the match before the interval with an impressive finish, before Marco Asensio took over with a couple of goals from the bench in front of more than 70,000 spectators at FedEx Field.
These two sides have got to know each other well in recent times, facing off in the Champions League quarters last season and the final in 2017, and they are now further associated following Cristiano Ronaldo's recent high-profile switch between the clubs.
Ronaldo was not involved in this prestige friendly, however, and in his absence Madrid toiled with little reward in the final third for large parts of the first half.
Juve, four games into their summer programme compared to two for Madrid, looked sharper in the early stages and took the lead 12 minutes in.
Summer signing Joao Cancelo was given space to run into down the left and sent a dangerous delivery into the box, which Carvajal intended to cut out but only succeeded in sending past Keylor Navas in the Madrid goal.
Los Blancos did wake up after that setback, though, and after 25 minutes of probing they finally had a leveller.
A little over two months on from his brace to win Madrid the Champions League, Gareth Bale controlled an awkward ball and fired a half-volley past Wojciech Szczesny to get off the mark for 2018-19.
Sergio Reguilon, one of a few youngsters handed a start to plug gaps left by Madrid's World Cup absentees, then came close to edging his side in front from a smart effort inside the box, before Bale struck a long-range free kick at Szczesny.
Madrid did have a third early in the second half, however, as two half-time subs in Vinicius and Asensio combined - the latter converting from five yards after being picked out by his new teammate.
Asensio doubled his tally before the hour mark by latching on to Lucas Vazquez's pass and tucking the ball below Szczesny, giving the European champions some breathing space.
Juventus struggled to get a foothold on the match due to Madrid's high-intensity play, and the flow of the game was not helped by the number of subs.
A good stop from replacement keeper Andriy Lunin to keep out Cancelo ensured that Madrid's two-goal lead remained intact for the final quarter of the match, while Giorgio Chiellini perhaps should have done better when slipped through by Miralem Pjanic.
Federico Bernardeschi was also thwarted by the impressive deputy stopper from a whipped in free kick, with Madrid holding on for their first win of pre-season and inflicting a first defeat on the Bianconeri in the process.
REAL MADRID: Navas (Lunin 64'); Carvajal (Odriozola 46'), Javi Sanchez (Odegaard 78'), Nacho Fernandez (Leon 78'), Sergio Reguilon; Federico Valverde, Toni Kroos (Llorente 46'), Ceballos (Mayoral 64'); Bale (Vazquez 46'), Benzema (Vinicius 46'), Isco (Asensio 46')
JUVENTUS: Szczesny (Perin 63'); De Sciglio, Benatia (Rugani 63'), Chiellini (Barzagli 71'), Alex Sandro; Khedira (Fagioli 46'), Pjanic (Fernandes 71'), Marchisio; Cancelo, Favilli (Pereira 63'), Bernardeschibody check tags ::