Massa, who has spent eight seasons with the Maranello marque, took to Twitter to state he would be leaving the team at the end of this season.
Massa said: "From 2014 I will no longer be driving for Ferrari."
Massa, who has made 184 starts for Ferrari - winning 11 races - since joining them in 2006 from Sauber, added: "I would like to thank the team for all the victories and incredible moments experienced together.
"Thank you also to my wife and all of my family, to my fans and all my sponsors.
"From each one of you I have always received a great support!
"Right now I want to push as hard as possible with Ferrari for the remaining 7 races.
"For next year, I want to find a team that can give me a competitive car to win many more races and challenge for the championship which remains my greatest objective!"
Massa's announcement comes as a surprise, although the assumption would be he was given permission by Ferrari to deliver his message.
However, it paves the way for Ferrari to end the feverish speculation that swirled around the Monza paddock over the course of the Italian Grand Prix weekend surrounding Raikkonen.
The 33-year-old departed Ferrari at the end of 2009 seemingly under a cloud as the team opted to let him go and pay off the final year of his contract in order to seal a deal for Fernando Alonso.
Raikkonen took a two-year sabbatical by competing in rallying before returning to Formula One at the start of 2011 with Lotus.
The Finn has helped the Enstone-based marque become winners with victories in Abu Dhabi last season and Australia at the start of this.
Only recently Raikkonen set a new record for most consecutive races in the points with 27 before retiring in the Belgian Grand Prix last month with a brake failure.
Off the track, however, Raikkonen's future has been a constant source of gossip and rumours, resulting in him speaking with Red Bull about their vacancy, with Mark Webber due to retire at the end of the year.
Raikkonen was ultimately overlooked as Red Bull chose Toro Rosso's Daniel Ricciardo to partner three-times world champion Sebastian Vettel.
With Lotus unable to offer Raikkonen the assurances he sought with regard to their financial and technical direction, talk of a return to Ferrari has intensified, which is likely to be announced tomorrow.
After 11 seasons in F1, Massa clearly has no intention of leaving and may now become a target for Lotus, who will be eager to sign a top-level replacement for Raikkonen.
The 32-year-old Brazilian has unfortunately had to play second fiddle to Alonso over the past four years, epitomised on Sunday when he was asked to move over to allow the Spaniard by.
Massa at least knows what it is like to challenge for a title, as was the case in 2008 when he came within seconds of winning the crown with Ferrari on home soil, only to lose out to Lewis Hamilton.
In 2009, Massa was involved in a life-threatening accident in Hungary which resulted in him requiring emergency surgery and a plate inserted into his skull.
Since his 2008 victory at Interlagos, however, Massa has failed to win a race and been on the podium on just nine occasions in 78 attempts.