"Obviously I would have liked to play more this season but I must say that, despite some difficult decisions, the manager has always treated me in an exceptional manner, for which I am extremely grateful," he told the official United website.
"I am leaving with some very special memories - scoring a Champions League goal at Old Trafford, beating Arsenal in April on the way to winning the title and, most of all, the experience of being part of this fantastic group that won the Premier League and Champions League double.
"Finally, a special thanks to the fans for their warmth and support. I would like them to know that I will always carry United in my heart and I hope that they understand my decision to go back to my home club, FC Barcelona.
"Thank-you all and I hope to see you in the Champions League final next season."