The Brazilian, whose 267 Grand Prix starts are the sixth most in history, was initially scheduled to leave the F1 grid at the end of 2016, but was tempted back to Williams when Valtteri Bottas moved to Mercedes.
Williams confirmed last month that Massa was one of several drivers under consideration for a 2018 race drive alongside Lance Stroll, but the 36-year-old has now confirmed that the upcoming races in Brazil and Abu Dhabi will be his last.
“As everyone knows, after announcing my retirement from Formula One last year, I agreed to return this season to help Williams when the call came,” Massa said.
“I have now enjoyed four great years with the team, but my career in Formula One will finally come to an end this season. Once more, I would like to say a big thank you to everyone who has supported me throughout this time: my wife and my father, my whole family, my manager Nicolas and all my friends, colleagues and sponsors.
“I would also like to add a huge thank you to all of the fans who have been incredibly supportive and passionate over the years. I take so many great memories with me as I prepare for my final two races in Brazil and Abu Dhabi, and although they will be emotional, I am looking forward to ending on a high note and preparing for a new chapter in my career.”
Claire Williams, Deputy Team Principal, Williams Martini Racing added: “I would like to thank Felipe for all he has done for the team over the last four years. It has been an absolute pleasure to work with him.
“We are especially grateful that he agreed to postpone his retirement from Formula One for a year, after Valtteri joined Mercedes, which demonstrated the depth of the relationship we built during our time together.
“We appreciate that it wasn’t an easy decision for him to return, after having such an emotional send-off at the end of last year. On behalf of Sir Frank, and all the team, we give our very best wishes to Felipe for the future.”
In 14 and a half seasons in F1, Massa has raced for Sauber, Ferrari and Williams, scoring 11 wins, 16 pole positions and 41 podiums. His best championship finish came in 2008 when he was narrowly beaten into second place by Lewis Hamilton in what was arguably the most dramatic title showdown in history in Brazil.
WATCH: Emotional Massa crashes out of what was meant to be his final race at home in 2016
Unfortunately, we are unable to play the video at this time.
Error Code: UNKNOWN