The incident occurred at around 11.30am during a manoeuvre involving a train from the Matterhorn-Gotthard-Bahn, the rail company said in a statement.
The locomotive was supposed to move from the back of the five-carriage train to the front on a parallel track.
But Jan Barwalde, a spokesman for the rail company, told AFP something had gone wrong and the locomotive had slammed into the carriages.
“For some reason, the locomotive drove into the convoy it had just detached from, instead of moving onto the parallel track,” he said.
He said the locomotive had been travelling at a speed of only 15 to 20 kilometres per hour (9-12 miles per hour), and there appeared to be very little material damage.
Around 100 people were on the train at the time.
Uri police said in a statement that none of the injuries was life-threatening.
Three rescue helicopters and around a dozen ambulances were sent to the scene, Swiss media reported.
The regional police and the Swiss Transportation Safety Investigation Board have opened an investigation into the circumstances surrounding the accident.