Peterhansel withstood a solid attack on the 12th and final short stage to lead Peugeot to back-to-back crowns as he beat team-mate Sebastien Loeb by 5min13s.
The third Peugeot 3008 DKR driven by Cyril Despres claimed the final podium spot, almost 33 minutes off Peterhansel's winning time.
Toyota claimed fourth and fifth outright through Nani Roma and Giniel de Villiers.
The result sees Peterhansel extend his winning tally in the car class to seven after winning the bike category six times in the 1990's.
Peterhansel, 51, acknowledged the tenacious fight put up by his French compatriot and nine-times World Rally Championship winner Loeb.
“We were fighting against a super fast champion,” Peterhansel said.
“My strategy was to push Sébastien to his limits. This made him more likely to make mistakes, which he eventually did, so it's not a matter of luck.”
In the absence of his KTM team-mate and 2016 Dakar winner, the injured Toby Price, Sam Sunderland created history at this third attempt in the bike class by becoming the first British winner.
With just 64km of timed running ahead of the liaison into Buenos Aires, Sunderland, maintained his edge to win by 32 minutes from fellow KTM rider Matthias Walkner while Gerard Farres Guell was third, in a KTM podium shut-out.
“The weight on my shoulders of the race over the last week, leading the rally has been really heavy,” an emotional Sunderland said.
“To finish here is incredible. It's the first Dakar I've ever finished and to finish first is an incredible feeling. I'm really lost for words.
“It's been difficult, especially in some of the moments with navigation mistakes or when things get stressful, to stay calm.
“It's been really the most difficult thing to do, but we're here, we did it and I couldn't be any happier. It's incredible to be the first Englishman.
“Hopefully we can create some English interest now, because so far they've not been reporting much, but I hope we can change that”.
The highest-placed Australian, Todd Smith (KTM) was classified in 18th overall.