The German driver made a pass on long-time leader Sam Bird to get to the front, and was able to resist Dennis' advances in order to chalk up his first win of the season in Saudi Arabia.
Having made up three places on the first lap after benefitting from a pile-up between Mitch Evans, Lucas di Grassi and Oliver Rowland, Wehrlein made up another place on the eighth lap when Rene Rast went too wide into the Turn 18 chicane.
The Porsche driver waited until lap 13 to take his first attack mode, opting for a three-minute dose to start with, which brought him close enough to pass Jake Hughes when the Briton grabbed his first activation.
With great pace, Wehrlein then caught polesitter Sebastien Buemi - who had been passed by Bird on the seventh lap - and then nipped past once the Envision racer had gone off line to accept his first power boost on lap 23.
This put Wehrlein on the stage to contend for victory, and he immediately filled Bird's mirrors with his black and red Porsche in his bid to make a play for the lead.
Wehrlein looked to have taken it on the 25th tour as he dived past Bird at the Turn 18 chicane, but he overcooked it under braking and went into the run-off to hand Bird a reprieve.
This put Bird into a more defensive mindset and, on the subsequent four laps, he took to the middle of the road on the run to the chicane to ensure Wehrlein would have to go around the outside.
But the siege from Wehrlein did not abate, and the German forced a successful attack on Bird on lap 30 with a near carbon copy of his attempt earlier on - but sans lock-up to ensure the lead was secured.
With more energy than Bird, Wehrlein was able to make hay and put a gap on the Jaguar driver, which left the latter under attack from the charging Dennis after the Andretti driver had cleared the McLarens and Envisions.
Dennis cleared Bird on lap 34 at Turn 18, and was immediately thrust behind Wehrlein as the Porsche driver collected his final minute of attack mode.
Told on the radio that he was half-a-percent behind Dennis on useable energy, Wehrlein had to box clever to remain in front, particularly when the Mexico City E-Prix winner had a look on the penultimate lap.
Wehrlein had saved enough to hold firm on the final lap, however, and despite Dennis considering a move into the final corner, the win was Wehrlein's.
More to follow.
Formula E Diriyah E-Prix - Race 1 results
Source: Autosport