Porsche will compete in the all-electric Formula E series from 2019, ending its involvement in the top category of Le Mans sportscar racing.
Porsche's prototype 919 Hybrid won the Le Mans 24 Hours in each of the past three years and also won the 2015 and 2016 World Endurance Championships.
The manufacturer will halt its Le Mans programme at the end of this season, a year before its existing contract ends.
German rival Mercedes has also announced plans join Formula E in 2019.
Michael Steiner, of Porsche's research and development board, said: "Formula E is the ultimate competitive environment for driving forward the development of high performance vehicles in areas such as environmental friendliness, efficiency and sustainability."
Formula E chief executive Alejandro Agag added: "If somebody told me when we started this project five years ago, that we'd be announcing a partnership with a brand like Porsche, I wouldn't have believed it."
Porsche's departure from Le Mans leaves Toyota as the only LMP1 manufacturer in the series, and also calls into question the Japanese company's future involvement.
Audi, like Porsche also part of the Volkswagen Group, announced last year that it was quitting Le Mans and the WEC to shift resources to Formula E.
Other manufacturers already involved in the electric series include BMW, Renault, Jaguar and Citroen.