The friendly will be played on July 23 at the 65,000-capacity Allegiant Stadium in Las Vegas as the two Spanish clubs go head-to-head before the start of La Liga in August.
Real Madrid will then face Mexican side Club America in San Francisco three days later before playing Juventus in Los Angeles on July 30.
Barcelona take on Inter Miami on July 19, Real Madrid and then Juventus on July 26 in Dallas before finishing their American tour against the New York Red Bulls on July 30.
It will be the second time Real Madrid and Barca have met in the US. They played each other at the Hard Rock Stadium in Miami in July 2017, in front of a sold-out crowd of 64,000. Barca won that game 3-2, with Lionel Messi on target.
Real Madrid won La Liga comfortably last season, finishing 13 points ahead of Barcelona, although Barca scored a stunning 4-0 victory against Madrid at the Santiago Bernabeu in March.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)