Speaking at a press conference this afternoon, Guardiola explained that he had taken the club as far as he could in his four years at the helm.
"This is not a simple decision for me, but I'll try to explain," he said. "The reason is simple: after four years, it gets everybody tired.
"I've always wanted short contracts because the demand from Barcelona is so big. I always thought that four years is an eternity for a coach.
"Perhaps we wouldn't have gone wrong but I've got the perception that we would. We've done too many strong things together to run the risk that this could go wrong. It's my time to go."
Guardiola said that he had reached his decision last December but was advised to keep the news quiet.
"In December I announced to the chairman that I would see in the end of my era at Barcelona, but obviously we couldn't say that to the players and the public. I couldn't have said that because it was too complex.
"Now we're out of the two main competitions (the La Liga title and the Champions League), it's a good time to announce it."
The 41-year-old, a former midfielder with the Spanish giants, added that he was "deeply sorry" for the speculation over his future in recent months.
In his time at the helm of the club, Barca have won the league three times and lifted two Champions League trophies. This season has been less successful, however, with rivals Real Madrid now a shoo-in for the title and a loss to Chelsea in the semi-finals of the Champions League.
Barcelona immediately confirmed Guardiola's assistant Tito Vilanova as the new coach for next season.