The 22-year-old man, arrested in the southern French city of Carcassonne on Monday after months under surveillance, has been charged with association with a terrorist group, the source said.
He was carrying a knife and a small mallet when he was arrested, the source said, adding that the suspect suffered mental health problems and was believed to be planning an imminent attack against tourists.
The charges come with France on high alert for terror threats as it hosts hundreds of thousands of foreign fans for the month-long Euro 2016 football championships.
The country is still under a state of emergency following the jihadist attacks that killed 130 people in Paris in November.
On Monday, an extremist pledging allegiance to the Islamic State group knifed a policeman and his partner to death at their home in the Paris suburbs before he was killed in a police raid.
The suspect arrested in Carcassonne comes from the southern French town of Lunel — notorious for the number of residents who have left to wage jihad in Syria — but had been living in the nearby Tarn region.
The suspect told investigators after his arrest “he had spent a lot of time watching videos of the Islamic State group and jihadist sites, and that he was fascinated,” the source said.
The young man admitted he wanted to go to Syria but could not afford it, so was planning an attack on home soil “in the name of armed jihad”, the source said.
According to his lawyer Jocelyn Momasso Momasso, “he has explained that his motivations were essentially linked to international politics”.
He wanted to “avenge his brothers” who have fallen victim to air strikes by the international coalition targeting the IS group in Syria, the lawyer said.