The collision occurred around 1.45pm when a passenger train operated by AOMC was travelling from Aigle in the canton of Vaud to the centre of Monthey, Valais cantonal police said.
The crossing is located between the Avenue de France and Rue des Marmittes, police said.
“A body was stretched out on the tracks of the AOMC,” a witness told 20 Minutes newspaper.
Despite the intervention of emergency rescue staff, the man died at the scene, police said.
It is not clear why the cyclist was travelling through the crossing at the same time as the electric train.
The AOMC (Aigle-Ollon-Monthey-Champèry) railway, more than 100 years old, traverses the Rhône valley to link with mountain resorts in the French-Swiss Portes du Soleil Alpine region.
It is part of the public transport system for the Chablais region (TPC), serving communities in the Vaud and Valais Alps, as well as the Rhône Valley.