The Inter7City train, which only had staff on board, partially came off the tracks just south of Dalwhinnie station after being wrongly diverted onto a crossover which links the two tracks, the UK Department for Transport’s rail accident investigation branch (RAIB) said.
The train ran over the crossover at more than twice the maximum permitted speed, with the derailed part damaging tracks and signalling equipment.
None of the five people in the train were injured in the incident shortly after 3am on Saturday April 10.
It was being used to check distances between the train and station platforms ahead of ScotRail increasing the length of such trains from four to five carriages.
A 38-mile stretch of the line between Kingussie and Balir Atholl was closed for repairs until Thursday April 15.
The RAIB said the train had been wrongly diverted from the southbound line to the northbound line at a crossover about 190m south of Dalwhinnie station.
The rear of the train was derailed because the points controlling the crossover moved under it.
It was travelling at 33mph compared to the 15mph limit over the crossover, but could have been travelling at the 70mph permitted line speed.
The RAIB reported: “The signal on the approach to the crossover was displaying a proceed indication for the route along the up [southbound] line and there is no signalled route from there, over the crossover, to the down line.
"Both sets of points forming the crossover were detected as being in the correct position for the up-line route by the signalling system and were indicated as such to the signaller, even though the points at the north end of the crossover (the end nearest Dalwhinnie station) were set in a position to divert the train onto the crossover.
“Our investigation will seek to identify the sequence of events which led to the accident.”
The RAIB said it would also look at why the signalling system did not detect the points were in an incorrect position, and how they were able to move as the train passed over.
It will also consider “factors associated with the installation, testing and maintenance of the point machines that operated the crossover”.