Webber won nine Grand Prix races during a 12-year career in F1 that saw him finish third in the championship three times.
Australian ex-Formula One driver Mark Webber will retire from motor racing after next month's Six Hours of Bahrain, the final leg of the World Endurance Championship, his Porsche team said on Thursday.
Webber, 40, won nine Grand Prix races during a 12-year career in F1 that saw him finish third in the championship on three occasions before moving into endurance racing in 2014.
A world endurance champion in 2015, Webber will become a Porsche ambassador following his retirement and work as a consultant for the German sports car manufacturer.
Webber and his Porsche team-mates Timo Bernhard and Brendon Hartley have won the last three races this season, but the trio remain a distance behind the second Porsche team, who lead the standings with three stages remaining.
"I have arrived where I belong," Webber said in a statement. "Porsche is the brand I always loved most and the one that suits me the best. The 911 is iconic ? it has got elegance, performance and understatement, and is never intrusive.
"I will miss the sheer speed, downforce and competition, but I want to leave on a high and I?m very much looking forward to my new tasks."
Webber partnered four-time world champion Sebastian Vettel as Red Bull collected four successive constructors' titles from 2010-13 before leaving F1 for a new challenge.
He has won seven endurance races since making the switch and also finished second at last year's Le Mans 24 Hours.
Webber will compete in Sunday's race at Fuji in Japan, at Shanghai on November 6, and then end his racing career in Bahrain on November 19.