The 17-year-old victim said he was beaten by two teenage attackers of North African origin on a Toulouse-Lyon train late Wednesday, according to a police source.
He said he was insulted and attacked after speaking on the phone to his brother, "who has a Jewish name". Speaking later to local media, he denied initial reports that he was wearing a Star of David pendant.
Passengers and railway staff intervened to stop the attack. The alleged assailants were detained Thursday in an army recruitment office in Lyon.
Toulouse city's Ozar Hatorah school, where the victim was educated, was targeted in March by serial killer Mohamed Merah, who was later killed by police after a 32-hour siege of his flat.
Merah, 23, a petty criminal of Algerian origin who claimed to be acting for Al-Qaeda, killed three children and a teacher at the school, later saying he sought to avenge Palestinian children killed by Israel.
Merah also shot dead three French troops in cold blood.
The president of the city's Jewish community, Ariel Bensemhoun, expressed "dismay" about "a new anti-Semitism that is ravaging France".
According to interior ministry data, the number of anti-Semitic acts and threats in January-April was up 46 percent on the previous year in France, although the rising trend had flattened out since a peak in March.