The 25-year-old, whom sources said had been monitored by intelligence agencies after trying unsuccessfully twice last year to travel to Syria, was held late last month and charged on November 2.
The interior ministry said in a statement that the man had been under surveillance "because of his radicalisation and public support for jihadist ideology" and had "attempted to acquire material to carry out a violent attack on Navy personnel in Toulon".
While he was being monitored, he had a parcel delivered by the post office which was found to contain a combat knife and a mask.
During questioning he admitted he had been in contact with a Frenchman currently in Syria with the Islamic State (IS) group who had encouraged him to act, a source close to the case said.
He eventually admitted plotting to attack sailors at the Mediterranean base of Toulon, home to 70 percent of the French fleet and 20,000 military and civilian personnel, though a police source said he had not formed a detailed plan.
One source said the French IS fighter had himself been held for several months in France for making violent threats against satirical magazine Charlie Hebdo in 2012.
In January Islamist gunmen carried out a string of attacks in Paris that left 17 dead, including much of the editorial team of the satirical magazine Charlie Hebdo.
The country has been on high alert since then and several other attacks have reportedly been foiled.
Attacks by extremists returning from Syria or in online contact with jihadists there figure high among the French intelligence services' worries,
More than 500 French fighters are thought to be with IS in Syria and Iraq, according to official figures, while 250 have returned and some 750 expressed a desire to go there.
Posted by Women Against Shariah on Wednesday, November 11, 2015
From France 24: