On 7 October 2015, Mayoral made his debut for the under-21 team in a qualification match away to Georgia for the 2017 European Championship; he replaced Samu Castillejo with an hour played, and nine minutes later converted Saúl Ñíguez's assist in a 5–2 comeback victory. He scored a hat-trick away at Northern Ireland U21 in Group 2 of the following U21 Euros qualifying campaign.