The suspect, described as a Swiss man aged 27, was also taken to hospital after the incident near Salez in St Gallen Canton, close to Liechtenstein.
He had ignited a flammable liquid before attacking people with a knife.
Among the injured is a child of six. There was no immediate information as to motive or background.
Three rescue helicopters are at the scene. A major police operation is under way.
The attack occurred around 14:20 (12:20 GMT) as the train was approaching Salez station, between the towns of Buchs and Sennwald.
Several dozen passengers were on board at the time of the attack.
Apart from the child, a girl and a boy, both 17, two women aged 34 and 43, and a man aged 50 were hurt.
Some of the injured are said to be in a serious condition.
European states have been on the alert for “lone wolf” attacks after a series of recent incidents.
Last month, an Afghan asylum seeker attacked passengers on a train in the neighbouring German state of Bavaria with an axe, injuring four people.
The so-called Islamic State later claimed the attack, releasing a video of the attacker who was shot dead by police as he fled.