The 32-year-old has driven for the Italian outfit for eight years, during which he has won 11 races, but Ferrari have been looking to recruit a replacement for him following three years of inconsistent performances.
They have been courting Raikkonen as his potential successor for some time, and reports claim that the Finn has agreed a deal, which could be confirmed imminently, to join them from Lotus Renault for the 2014 campaign, leaving Massa surplus to requirements.
"From 2014 I will no longer be driving for Ferrari. I would like to thank the team for all the victories and incredible moments experienced together," Massa tweeted.
"Right now I want to push as hard as possible with Ferrari for the remaining seven 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."
The Brazilian has competed in 186 Formula 1 races, reaching the podium on 36 occasions, but not as a winner since the 2008 Grand Prix on his home soil.