In a statement that paid tribute to Alonso's contribution to the Formula One giants, Ferrari ended months of speculation regarding Alonso, who has been tipped to return to the McLaren team.
"Scuderia Ferrari and Fernando Alonso announce that, by common consent, they have ended their relationship," said a statement.
"Fernando Alonso leaves the team at the end of this season, after a five year period which, with one race remaining, saw him score 1186 points, 44 podiums and 11 wins.
"Everyone at Scuderia Ferrari thanks Fernando for his great contribution on both a personal and professional level."
Alonso, who won two world titles with Renault in 2005 and 2006, ultimately failed to bring a world drivers' title to Ferrari having come runner-up three times for the team whose logo is the Prancing Horse.
The 33-year-old Spaniard has recently been tipped to return to the McLaren team, where he spent a turbulent season in 2007. But he admitted leaving Ferrari was not an easy decision to make.
Alonso said: "Today is not an easy one for me, because even if I always look to the future with great enthusiasm and determination, at the end of this season my journey as a Ferrari driver will come to an end.
"It was a difficult decision to take, but a carefully considered one and from start to finish, my love for Ferrari was a prime consideration.
"I leave Scuderia Ferrari after five years, during which I reached my very best level professionally, tackling major challenges that pushed me to find new limits.
"Thanks to the efforts of the men and women of Maranello, on three occasions we came second in the Formula 1 World Championship, two of them fighting for the title right up to and including the final race, running in a championship winning position for many laps."
"Now I look to the future with great enthusiasm, knowing that part of my heart will always belong to the Prancing Horse.
"I want to thank each and everyone of the team for the trust they showed in me."
Team Principal, Marco Mattiacci, said: "We offer him our heartfelt thanks for what has been an extraordinary adventure with the Scuderia, when in the past five years, he twice came so close to winning the world championship.
"I am sure that a great driver like Fernando will always hold the Prancing Horse dear to his heart and I also expect the Ferrari fans will continue to hold him in high regard in his future endeavours."