The Brazilian lapped a three hundredths of a second quicker than Fernando Alonso in the dying seconds of the final qualifying session.
Lewis Hamilton joined Massa on the front row, with Ferrari's Kimi Raikkonen lining up third.
Finn Kimi Raikkonen reported back to work as Formula One world champion on Tuesday.
Lewis Hamilton won a dramatic Russian Formula One Grand Prix on Sunday to take a huge step towards his third world championship after Mercedes teammate Nico Rosberg retired with throttle failure.
British rookie Lewis Hamilton finished second in the Malaysian GP to hand McLaren their first one-two since 2005.
Ferrari showed off their 2020 Formula One car with a theatrical show of pride and passion on Tuesday, assuring success-starved fans that it was also very different under the skin to last year's model. The SF1000, marking the Italian team's 1,000th race that comes up this year, is the car Ferrari hope can end six years of Mercedes domination and dash Lewis Hamilton's bid to equal Michael Schumacher's record seven titles.
"Over there people don't come up to you, they leave you alone and give you space," the 22-year-old McLaren driver, who finished one point behind Ferrari's Kimi Raikkonen in a remarkable debut season, told the BBC.
It was a remarkable comeback by Ferrari's Kimi Raikkonen, who had trailed Lewis Hamilton by 17 points with two races to go.
Hamilton, eight points behind Vettel after 10 races, qualified 14th.
Ferrari dominated French Grand Prix free practice on Friday with Felipe Massa and Kimi Raikkonen reviving the Italian team's hopes of ending McLaren's winning streak.
Lewis Hamilton of Mercedes stormed to pole position with a scorching lap in qualifying for the Malaysian Grand Prix as title rival Sebastian Vettel was left stranded in the garage and will start dead last.
"It was a really bad accident, pretty unlucky," Perez told reporters of his crash at the Hungaroring.
Ferrari's Felipe Massa and Kimi Raikkonen made a flying start to the Formula One season on Friday with the fastest times in free practice for the Australian Grand Prix.
Lewis Hamilton lapped fastest overall for Mercedes in Hungarian Grand Prix practice
The Brazilian now looks much more like the real deal, no longer simply plugging a hole at Ferrari until someone better comes along.
Felipe Massa is no longer simply plugging a hole at Ferrari until someone better comes along.
The 22-year-old McLaren driver needed to win or finish ahead of team mate Fernando Alonso and Kimi Raikkonen at the Chinese Grand Prix to win the world title but his race ended when he slid off the asphalt and into the gravel when approaching the pit lane.
Formula One world champion Lewis Hamilton won the Bahrain Grand Prix for the second year in a row on Sunday with Ferrari's Kimi Raikkonen back on the podium to deny Mercedes another one-two finish under the floodlights.
The Finn drove Ferrari's 2007 car for the first time in Valencia on Tuesday.
Nico Rosberg will start his home German Grand Prix on Sunday from pole position after setting the fastest time in qualifying on Saturday.
Valtteri Bottas won a dramatic first race of the delayed Formula One season for champions Mercedes in Austria on Sunday
Mercedes won the Formula One constructors' title for the fourth year in a row on Sunday but Lewis Hamilton was made to wait despite cruising to a U.S. Grand Prix victory at one of his favourite circuits.
Renault rushed to fix a problem with their new Formula One power unit on Wednesday after Red Bull's world champion Sebastian Vettel wrapped up his first pre-season test early with barely any laps completed.
Charles Leclerc seized pole position for the Belgian Formula One Grand Prix on Saturday ahead of team mate Sebastian Vettel who completed a front row lockout for Ferrari.
On the 20th death anniversary of Brazilian Formula One legend Ayrton Senna, fans and the sporting community paid tribute to the man who was arguably one of the best drivers in F1 history.
US Grand Prix winner Kimi Raikkonen has always been known as 'The Iceman' but Formula One fans could soon have much more of an insight into just how cool he really is in the heat of battle.
McLaren set the pace in Friday's Brazilian Grand Prix practice with Colombian Juan Pablo Montoya the fastest race driver.
The Briton's latest victory, in a Tuscan Grand Prix that was twice red-flagged and re-started, left him one shy of the Ferrari great -- a record once held up as a milestone to withstand the test of time.
Formula One world champion Lewis Hamilton took pole position for the Canadian Grand Prix on Saturday with Mercedes team mate Nico Rosberg qualifying alongside him on the front row.
Details of the 19-race F1 calendar, which has the same number of races as last year. Start times are 1200 GMT (1730 IST).
Red Bull's Max Verstappen won a wet and crazily chaotic German Grand Prix littered with crashes and safety car periods on Sunday with Mercedes' Formula One leader Lewis Hamilton failing to score.
Lewis Hamilton broke ranks with other drivers who said they were comfortable with assurances received from the governing FIA, even as other sports cancel events and competitions around the globe.
Raikkonen again suffered the heartbreak of retiring while leading.
The Colombian staunchly defended his attempt to steal pole position from team mate Kimi Raikkonen at the German Grand Prix despite ending up in the trackside gravel.
The 2019 Formula One world championship starts on March 17 with 21 races in a season that ends later than any since 1963.
German Nico Rosberg eased to victory in a chaotic Belgian Formula One Grand Prix on Sunday.
Formula One championship leader Nico Rosberg stormed to pole position for the Chinese Grand Prix in a mixed Saturday qualifying session for Mercedes, with world champion Lewis Hamilton left at the back of the grid after engine trouble prevented him setting a time.