The 44-year-old announced his decision following the Catalan club’s 5-3 home defeat to Villarreal on Saturday.
The result leaves Barcelona fourth in LaLiga, 11 points adrift of surprise leaders Girona.
Xavi, who made over 750 appearances for Barça as a player, has won two trophies as a manager with the Blaugrana. The 2010 FIFA World Cup winner lifted the LaLiga and Supercopa de España titles during the 2022/23 campaign.
Xavi said: “I want to announce that on June 30 I will no longer continue as the coach at Barça.
“I think the situation needs to change course, and as a culer [Barcelona fan], I cannot allow the current situation.
“And mostly as a cul, thinking about the club and about the players as well, I think they will feel more free, they will be calmer. I think we play with too much tension. It's for the benefit of the board, of the club.
“As a cul, as a club person, I believe the best thing is to leave on June 30. Of course, I will give all I have in the four months that are left.
“To explain a bit better, the feeling of being Barça coach is unpleasant, it's cruel. You feel that often there is a lack of respect, you feel they do not value your work, and this wears you down terribly.
“It affects your mental health. I am a positive person but the energy goes down to a point where you think that there is no sense.”
Here are the current favourites – including Brighton & Hove Albion head coach Roberto De Zerbi – to succeed Xavi according to Sky Bet.

9. Xabi Alonso
Xabi Alonso is another who is working wonders at his current club. The Spaniard has guided Bayer Leverkusen to the top of the Bundesliga, sitting two points clear of perennial champions Bayern Munich. The 42-year-old is priced at 10/1 to succeed Xavi, but it is widely expected he will return to former club Liverpool once Jürgen Klopp departs at the end of the season. Photo: Lars Baron/Getty Images

10. Julian Nagelsmann
Germany head coach Julian Nagelsmann is priced at 12/1 by Sky Bet. His Germany contract expires at the end of this summer's UEFA European Championship. Photo: Alexander Hassenstein/Getty Images

11. Thiago Motta
Bologna head coach Thiago Motta has been give odds of 12/1 by Sky Bet. The Italian came through FC Barcelona's academy, and spent six years in the first team from 2001 to 2007. Photo: Marco Luzzani/Getty Images

12. Graham Potter
A somewhat surprising candidate to succeed Xavi at the Camp Nou. The former Brighton & Hove Albion and Chelsea boss is priced at 16/1 by Sky Bet. Photo: JUSTIN TALLIS/AFP via Getty Images

