Following Saturday's 5-3 home defeat by Villarreal, Xavi confirmed his departure in the post-match press conference.
"I want to announce that on June 30 I will no longer continue as the coach at Barca," Xavi said.
"I think the situation needs to change course, and as a culer (Barca fan), I cannot allow the current situation."
Xavi continued: "It is a decision that I have made with the president (Joan Laporta), with (vice-president) Rafa Yuste, with (sporting director) Deco.
"I think the club needs a change of dynamic. For the good of the players, I believe that they will free themselves. We play with a lot of tension.
"For the good of the board of directors, it is best that I leave.
"I will give my best. I think all of that will help the dynamic change. This is the message I would like to give. I think I am doing the right thing.
"I wouldn't change my decision even if I won the Champions League. I will tell the players tomorrow. I'm the most responsible one, so the players will finally feel free now."
Xavi feels his decision will allow the team and club to move forward into the rest of the campaign, which will also see them in the knockout stages of the Champions League.
"This de-escalates the general situation," he said. "Until today, good work has been done, but I think that our project, as a coach, is until June 30. This will remove tension.
"I have made the decision for days, and in a way, I have freed myself, but I don't want to be a hindrance.
"I have always wanted to be a solution for Barca, as I was two years and three months ago - but thinking with my heart, I think it is best for him to leave office on June 30.
"I thank the president for his trust. All this will de-escalate the general situation."