The 36-year-old Australian has decided to end his association with Red Bull and will instead race events such as the Le Mans 24 Hours.
Lotus driver Kimi Raikkonen is favourite to replace Webber at Red Bull after he decided not to remain as team-mate to world champion Sebastian Vettel.
Webber, who had options to move to other F1 teams, could also be replaced by either of Toro Rosso's current drivers, Daniel Ricciardo and Jean-Eric Vergne.
"Porsche has written racing history as a manufacturer and stands for outstanding performance and technology at the highest level," said Webber.
"I'm very much looking forward to this new challenge after my time in Formula 1. I can hardly wait to pilot one of the fastest sports cars in the world."
Having begun his F1 career with Minardi, Webber went on to compete for Jaguar and Red Bull over the following 12 years, twice finishing third in the driver standings and standing on the podium 36 times.
Webber has seen his relationship with Vettel deteriorate over the five years they have been team-mates. He was furious with Vettel after this year's Malaysian Grand Prix after the German ignored team orders and passed Webber to win.
Although Vettel apologised he later said he would do the same again, leading to Webber to repeat his claims that Vettel was favoured by Red Bull bosses.
The team had said he would be welcome to stay for 2014 but he has decided to move his career in a different direction.
Webber, from Queanbeyan in New South Wales, has won nine F1 Grands Prix from 205 starts and set pole position 11 times.
Following the Malaysia race, Webber admitted he needed time to reflect on his future.
He said at the time: ''Right now it's very early days, it's very raw, but we need to work out how the team best goes forwards from here.
''That's obviously going to be discussed this week. I will be in Australia on my surfboard, the phone won't be engaged, so let's see what happens.''
Although he decided not to quit the team or F1 immediately, Webber has obviously given his future further thought.
Racing for Porsche next season will not be his Le Mans debut.
He raced for Mercedes in 1998 and 1999 but a mechanical problem ended his debut early in the race.
Webber's Mercedes flipped in 1999 because of an aerodynamic flaw, and despite saying at the time he would not return to the French race, he has now decided to take up Porsche's offer.
Red Bull team principal Christian Horner had previously stated his intention to sit down with Webber later this summer to discuss the prospect of a further one-year contract extension.
Instead, Horner will now be scouting around for Webber's replacement.
"I am sure Mark thought long and hard before making what has no doubt been a very difficult decision," said Horner.
"His achievements in Formula One are extensive and I am sure he will continue to push hard and build on that record until the end of the season.
"We support Mark's decision, he has been an excellent addition to the team since joining us in 2007, and we wish him all the best in the next stages of his career."