Martínez started the 2017–18 season by playing in the German Super Cup. On 31 October 2017, Martínez scored the winning goal in a 2–1 away victory over Celtic during the Champions League group stage, which confirmed his team's passage to the knockout phase. In the process, he sustained a cut to his face in a clash of heads with Nir Bitton; it was his first ever goal in European competitions, in 59 appearances. Martínez finished the season with two goals in 37 appearances.