The move will bring to an end a 12-year career in Formula 1, with the Australian having raced for Red Bull in the last seven.
The 36-year-old is understood to have had options to stay in Formula 1, either with Red Bull or another top team, but feels it is time to move on in his career.
“Porsche has written racing history as a manufacturer and stands for outstanding performance and technology at the highest level,” Webber said.
“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.”
Webber, currently fifth in the F1 drivers’ standings, chose to only sign one-year contracts towards the latter stages of his career so he could leave the sport when he felt he wasn’t motivated enough to continue.
Red Bull team principal Christian Horner said: “I am sure Mark thought long and hard before making what has no doubt been a very difficult decision.
“His achievements in Formula 1 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.”
Porsche’s new sportscar programme includes an assault on the classic Le Mans 24 Hours.
Lotus’ Kimi Raikkonen is the early favourite to replace Webber at Red Bull, with Horner saying earlier this week: “Kimi would have to be an option, if he were to be available.
“We’re in the fortunate position that there are an awful lot of people who would like to drive a Red Bull racing car.”
Toro Rosso duo Daniel Ricciardo and Jean-Eric Vergne are both also in contention for the soon-to-be vacant Red Bull seat.
MORE: The latest football news
MORE: The latest tennis news