With both teams desperate for silverware, it was a tense start to the contest, but the game kicked into life shortly before the quarter-hour mark.
Les Sang et Or almost took the lead in style when Allan Saint-Maximin’s shot from just inside the box was steered inches over the bar, before Elye Wahi spurned a golden opportunity from close range for Les Aiglons.
As the half progressed, Saint-Maximin rounded the goalkeeper to put himself in a brilliant position, only for his eventual effort to be superbly blocked just in front of the goal line.
At the other end, Robin Risser produced impressive saves to deny Sofiane Diop and Dante in quick succession.
The deadlock was eventually broken after 25 minutes thanks to a precise finish from Florian Thauvin, who drilled home with his left foot from 15 yards out after meeting Matthieu Udol’s smart pass into the box.
Thauvin’s 14th goal of the season sent Les Sang et Or supporters wild at the prospect of a historic victory to cap off a tremendous season.
And Lens then doubled their advantage at a pivotal moment, putting themselves firmly in control when an excellent Thauvin corner found Odsonne Édouard, whose header took a deflection before flying past Maxime Dupé.
However, Nice struck back in first-half stoppage time, setting up a fascinating second half, as Djibril Coulibaly’s superb header from Jonathan Clauss’s corner halved the deficit.
Les Aiglons fought hard in their quest for an equaliser and came agonisingly close to levelling shortly after the hour mark, when Antoine Mendy’s header from inside the box crashed off the bar to Lens’ huge relief.
Despite Nice’s best efforts, Lens’ quality shone through, and they regained their two-goal cushion with 12 minutes remaining thanks to Abdallah Sima’s poked effort that rolled past the oncoming Dupé and over the line.
To Nice’s credit, Claude Puel’s side never gave up and hit the woodwork again with less than 10 minutes to go, when substitute Kevin Carlos saw his header bounce outside off the post.
Ultimately, tonight was all about Lens making history, and they managed the latter stages of the game well to secure a famous victory, with a trophy representing a fitting end to an excellent campaign for Pierre Sage’s side.
Meanwhile, the season is still far from over for Nice as they travel to AS Saint-Étienne on Tuesday in the first leg of their Ligue 1 relegation play-off.