On August 21, 1867, the railway line to the west from Rockhampton to Westwood, through Kabra, was opened. Later, when a railway line from Rockhampton to Mount Morgan became a necessity, it was decided to build the line from the nearest point on the western line, which was Kabra. To reach Mount Morgan, the line had to climb the Razorback Range, a height of some 968 feet above sea level, having a vertical rise of 376 feet.
Initially, the line was built from Kabra to Moonmera at the bottom of the range, then up the range to Moongan at the top of the range and thence to Mount Morgan. The first section of the line from Kabra to Moonmera was opened June 15, 1898. The second section from Moonmera to Mount Morgan was opened November 26, 1898. The distance from Kabra to Moonmera was approximately 9 miles, from Moonmera to Moongan 1.5 miles and from Moongan to Mount Morgan 2.5 miles, a total distance of about 13 miles (21 km).
The line from Moonmera to Moongan, built parallel to the existing road up the Razorback was very steep, having a gradient of 1:16.5 and the standard steam locomotive required assistance from an Abt rack engine to handle the train up and down the Razorback range. In descending the range, the Abt rack engine was attached to the front of the standard engine, while ascending the range, the rack engine was attached to the rear of the train.
The Abt rack locomotive, developed principally in Switzerland, was a powerful locomotive, having adhesive wheels and an independently powered engine beneath the boiler which drove pinions (toothed wheels) set between the adhesive wheels. These pinions meshed with the teeth of a serrated or toothed rack-rail attached to the sleepers midway between the normal running rails. This gave the necessary thrust or driving power to the rack engine.
The rack-rail consisted of two parallel serrated bars, about 2.5 inches apart and so arranged that the indentations on one bar were exactly opposite to the teeth on the other bar. There were two sets of pinions under the rack, arranged in such a manner that two pinions were always engaged with the teeth of the rack-rails at any time.
Most rack engines, including those used at Mount Morgan, were built according to a system patented in 1882 by Roman Abt and first used in 1885. The standard of maintenance of the rack engine needed to be very high and they were regularly overhauled at Rockhampton with standard maintenance by the staff of the locomotive depot at Mount Morgan. There were eight rack engines and they operated for fiftyfour years - from 1898 to 1952.
There were only two rack railway systems in Australia, the other being on the private Mount Lyell railway in Tasmania which closed in 1963.
With the view of a big increase in rail traffic coming from the Dawson-Callide Valley, especially the transport of coal from the Callide coalfields, and as the steep grade of the Razorback together with the time spent on connecting and disconnecting the rack engine considerably slowed down the service, it was decided to eliminate the rack section of the railway line and build a re-graded deviation line around the mountainside which could be operated by a standard locomotive engine. The deviation line has a gradient of 1:50 (compared with the rack section of 1:16.5).
The "deviation line" was opened on April 19, 1952. It was 6.5 miles (10.5 km) long and took 30 months to build and cost £350,000 ($700,000). The line was constructed by contractor Mr. W. Shapoloff, under supervision of resident engineer Mr. N.H. Walker. With the opening of coal mines in the Kianga-Moura area in the Dawson Valley to supply coal to Japan, it was necessary to have better and quicker haulage facilities to the port of Gladstone, so a line was built direct from Moura to Gladstone. The first coal train ran on this line on January 22, 1968 and the official opening of the line took place on March 9, 1968.
Coal-fired steam engines were gradually replaced by diesel-electric locomotives which were stationed, overhauled and maintained at the locomotive depot at Rockhampton. Previously, the coal-fired steam engines were repaired and maintained at the Mount Morgan locomotive depot.
The first diesel-electric locomotive to work through Mount Morgan was on May 26, 1964. Steam train operations through Mount Morgan ceased in October 1967 and from this time on only diesel-electric locomotives operated through this centre.
The opening of the short direct line from Moura to Gladstone, which caused loss of rail traffic through Mount Morgan, and the change from steam engines to diesel-electric, which meant that engines were no longer maintained and serviced at Mount Morgan, all had a drastic effect on the need of Railway staff in the area and many fewer employees were required. The Mount Morgan locomotive depot was closed down in 1967, and less traffic branch employees were needed to handle the reduced traffic. In 1956 there were 96 railway employees in the Mount Morgan area; in 1975 there were 27.
In 1974 the Mount Morgan Railway Station Building and the Railway water tank were classified by the National Trust of Queensland. On November 22, 1975, plaques attached to the Railway Station and water tank by the Mount Morgan and District Historical Society were unveiled by the General Manager of the Queensland Railways Central Division, Mr. J.P. Goldston.
With activities at the Mount Morgan mine declining to a point where there was no outbound and little inbound traffic, and with the general traffic being limited, the costs associated with the retention of the depot at Mount Morgan were becoming too high to be economical, so in May 1984, the Mount Morgan Railway depot was downgraded to two employees, a stationmaster and a porter. Displaced employees were given the opportunity to apply for positions elsewhere and given financial assistance towards the cost of relocation, if required. Finally rail services from Rockhampton to Mount Morgan closed down on 1st August 1978 and the line was removed.