The German, 57, will be appointed chief executive officer of McLaren Racing, reporting to chairman Ron Dennis.
Capito will join at an unspecified date to be agreed between McLaren and VW.
Jonathan Neale, who had been in that role following the sacking of Martin Whitmarsh in early 2014, has been moved out of the racing department.
Neale will be chief operating officer of the McLaren Technology Group.
McLaren are aiming to improve their form in 2016 after a dismal first season of their renewed relationship with engine partner Honda last year, in which they finished ninth of 10 teams in the championship.
Despite having arguably the best driver line-up in F1 with former champions Fernando Alonso and Jenson Button, their best result was a fifth place in the Hungarian Grand Prix by Alonso.
The vast majority of their 2.5-second a lap deficit to world champions Mercedes was due to the engine, but the team acknowledge the car was also not on the pace of the very best.
They are still rebuilding after two uncompetitive seasons with the standard-setting Mercedes engine in 2013 and 2014.
Dennis described Capito as "an extremely impressive, competitive and ambitious individual" and said he was confident he would "take the McLaren-Honda programme forwards towards grand prix victories and world championship successes".
Capito has most recently headed VW's rally team to three consecutive world titles since 2013 but has also held senior positions at BMW, Porsche, Ford and the Sauber F1 team.
McLaren racing director Eric Boullier remains in his position, which will report directly to Capito.
McLaren have recruited former Volkswagen motorsport boss Jost Capito as the new overall head of their Formula 1 programme.