Security at Paris train stations was increased following the incident, an interior ministry representative said.
The two men were charged in connection with making an “apology” for a terrorist act, the ministry said, without elaborating.
One of the men, a French citizen, had been drinking and possibly has mental health issues. He shouted that he was going to blow himself up, the ministry said.
The ministry added that the two men had nine small camping gas bottles in their luggage, but no way of making them explode.
The second suspect, believed to be a Libyan citizen, had been under investigation for breaking immigration laws, the ministry said.