It will be the 32nd NBA game in Mexico since 1992, more than in any country besides the United States and Canada.
The Hawks will be playing in Mexico for the first time and the Magic for the fourth time since 2012.
"We're excited to welcome the Hawks and Magic to Mexico City next season and give our passionate fans the opportunity to see some of the brightest young stars in the game," said Raul Zarraga, NBA Mexico vice president and managing director. "There is so much momentum around basketball in Mexico, and this game and the surrounding events will serve as the ultimate celebration of the NBA for fans across the country and throughout Latin America."
NBA Cares community outreach initiatives and Jr. NBA youth basketball development programming and interactive activities will be part of the event.
The Hawks played a preseason game last year in the United Arab Emirates. The Magic have previously played in Japan, China and Brazil in addition to Mexico.