On 4 June 2018, Marquez was named in Mexico's final 23-man squad for the World Cup. This meant he would travel to his fifth World Cup finals, becoming only the fourth player in history to do so, alongside German Lothar Matthäus, Italian Gianluigi Buffon and fellow Mexican Antonio Carbajal. He was substituted in for Andrés Guardado at the 74th minute in Mexico's 1–0 win over defending-champions Germany, and became the third man in history to play at a fifth World Cup. On 2 July, in Mexico's round of 16 match against Brazil, Márquez became the first player ever to play as a captain in five World Cups and was substituted off at half-time, marking his last appearance as a professional.