The race will be held in the south of France at the Circuit Paul Ricard - also known as Le Castellet - which last staged the event in 1990.
The deal was announced by Christian Estrosi, the president of the regional authority of Provence and the Cote d'Azur, in Paris on Monday.
The French Grand Prix was last held at Magny-Cours in central France in 2008.
France hosted the first grand prix in 1906 but lost its race because the organisers were unable to fund the event.
Le Castellet is owned by the family trust of F1 commercial boss Bernie Ecclestone, but he told Reuters last week the promoters were renting the track from it.
The 86-year-old said the race was likely to be held at the end of July.
It is the second European race to return in the past few years - following the re-establishment of the Austrian Grand Prix, which is now funded by Red Bull.
Other European races are struggling to meet the demands for ever-higher fees from F1 - Germany has dropped off the calendar in 2017, although is expected to return in 2018, and the future of the Italian race was in doubt until a new deal was agreed last week.
Silverstone's owners have said they are looking into whether they will be able to continue to afford the British Grand Prix after 2019.
French driver Romain Grosjean tweeted: "Really super-happy for French fans, who will have their Grand Prix and can come to support us."
The French Grand Prix will return to the Formula 1 calendar in 2018 after an absence of 10 years.