Born in Asteasu, Gipuzkoa, Lopetegui started his professional career at local Real Sociedad, where he was barred by legendary Luis Arconada. In 1985, he accepted an offer from Real Madrid, which immediately incorporated the 19-year-old to its B-team. After a loan spell at UD Las Palmas Lopetegui returned, but could never dislodge another veteran, Francisco Buyo, only managing one La Liga appearance during two seasons, a 3–3 away draw against Atlético Madrid as Real were already crowned league champions. He subsequently signed with CD Logroñés, being instrumental as the modest Riojan club consistently managed to retain its top flight status. As Andoni Zubizarreta left for Valencia CF in 1994, Lopetegui joined FC Barcelona, battling – and losing – for first-choice status with longtime understudy Carles Busquets. After the Catalans bought FC Porto's Vítor Baía he was further demoted to third-string, and returned to Madrid with Rayo Vallecano, being a starter in two of his five seasons.
International
Lopetegui's performances at Logroñés earned him his sole cap with Spain, coming on as a substitute for Zubizarreta for the final 30 minutes of a 0–2 friendly loss with Croatia in Valencia, on 23 March 1994. He was subsequently picked for the squad at that year's FIFA World Cup.
Lopetegui returned to club duties on 6 May 2014, being appointed at Portugal's FC Porto. He signed seven Spanish players to the club that summer. In his first season at the Estádio do Dragão, with the club's biggest budget ever, Lopetegui led them to the quarter-finals of the UEFA Champions League, where they equalled the club's biggest defeat in European competitions losing 6–1 against FC Bayern Munich. He failed to win any silverware, contributing to the longest drought during Jorge Nuno Pinto da Costa's presidency. On 8 January 2016, after a 1–3 home loss to C.S. Marítimo in the Taça da Liga, as Porto had already been eliminated from the Champions League and was ranked third in the domestic league after an away loss and a home draw, Lopetegui was relieved of his duties and replaced by Rui Barros. A week later, the club announced that it had terminated the former's contract unilaterally.
Spain
On 21 July 2016, after being strongly linked to English side Wolverhampton Wanderers which was under new ownership, Lopetegui was announced as the new manager of the Spain national team following Vicente del Bosque's retirement. In his first match in charge, on 1 September, he led them to a 2–0 friendly victory over Belgium at the King Baudouin Stadium; the nation qualified for the 2018 World Cup, winning nine and drawing one of their group matches. On 12 June 2018, with the team already in Russia for the tournament, it was announced that Lopetegui would take over as the head coach of Real Madrid on a three-year contract after the conclusion of Spain's involvement at the World Cup. The following day, he was dismissed from his job with the national team and replaced by Fernando Hierro.
Real Madrid
Lopetegui's first competitive game in charge took place on 15 August 2018, in a 2–4 loss to rivals Atlético Madrid for the UEFA Super Cupafter extra time. Following a string of bad results and, ultimately, a 5–1 away defeat to Barcelona in El Clásico on 28 October, he was fired a day later, being replaced by Santiago Solari.
Sevilla
On 5 June 2019, Lopetegui was appointed as the new Sevilla FC manager on a three-year contract.