Barnes won a gold medal with the United States at the 2017 FIBA Under-16 Americas Championship in Formosa, Argentina after averaging 9.8 points, 3.2 rebounds and 2.4 steals per game. In a semifinal win over Argentina, he led all scorers with 20 points and six steals while breaking the American under-16 record for free throw percentage by shooting 8-of-8 from the free throw line. At the 2018 FIBA Under-17 World Cup in Argentina, Barnes averaged 9.5 points and 5.8 rebounds per game and captured another gold medal. He averaged 9.7 points, 4.9 rebounds and 2.7 assists per game at the 2019 FIBA Under-19 World Cup in Heraklion, Greece, where he won his third gold medal with the United States.