Mayoral started his first game after his return to Madrid on 17 September 2017 away to Real Sociedad. He scored the team's opening goal, his first senior goal for Real Madrid. In December 2017, he was part of the squad that won the 2017 FIFA Club World Cup in the United Arab Emirates, but did not play. During the 2017–18 UEFA Champions League, he made four appearances, while scoring one goal, when Madrid won their third consecutive and 13th overall Champions League title.