The 35-year-old made his F1 debut with the Sauber team in 2002, and has so far competed in 242 grands prix, making him one of the most experienced drivers in Formula 1 history.
The Sao Paulo native has won 11 races during his tenure and achieved his best result in the championship in second behind Lewis Hamilton in 2008, when Massa lost the title by a single point.
Massa's future in the sport was perceived as uncertain, his Williams team continuing to consider its options for 2017 and having not announced any drivers yet.
However, writing in his exclusive column for Motorsport.com, the Brazilian announced he will end his F1 career when the current season runs its course.
"In recent months I have been thinking a lot about my future and I have taken the decision that at the end of this season, I will leave Formula 1," Massa wrote.
"Life presents us with many choices and I think for me it has got to the time where I have to go and do something different.
"Maybe you will see me again at the wheel of a race car, but at the moment the only certainty I have is that I will have a lot of time to decide on what I do in the future."
Massa spent three years at Sauber before being promoted to Ferrari, racing alongside Michael Schumacher during the 2006 season.
Massa went on to race for Ferrari until the end of the 2013 season before switching to Williams.
The Brazilian admitted he had chosen the Italian GP weekend to reveal his retirement because it is the same venue where Schumacher had announced he was quitting, thus paving the way for Massa to continue at the Maranello squad.
"Why I chose to announce my Formula 1 retirement at Monza is not an accident," Massa added. "Ten years ago in Monza, a driver announced he was leaving too – and he is one more than any other that had an influence on career: Michael Schumacher.
"I had been promoted to Ferrari at the beginning of the season, but I had been told already that in 2007 Kimi Raikkonen would be arriving – so my experience in 'red' could have been limited to just a single season.
"Then Michael made the decision to stop and I was certain that I could continue with Ferrari for the following seasons.
"Ten years on from that day, and in the same paddock, I decided to announce my decision."
Massa, who famously missed part of the 2009 season after being injured when a spring hit him in the head during the Hungarian GP, said the worst memory of his career was not the injury, but rather the 2008 Singapore Grand Prix's "crashgate", which he reckons cost him the title that year.
"Without that incident I probably would have won the world championship, and I know that I didn't make it for reasons that are not related to a driver error or a team problem. So it is more difficult to accept," he said.