Shimla (then spelt Simla) was settled by the British shortly after the first Anglo-Gurkha war, and is located at 7,116 feet (2,169 m) in the foothills of the Himalayas. By the 1830s, Shimla had already developed as a major base for the British. It became the summer capital of British India in 1864, and was also the headquarters of the British army in India. Prior to construction of the railway, communication with the outside world was via village cart.
The railway was constructed on a two foot gauge (610mm) by the Delhi-Ambala-Kalka Railway Company commencing in 1898. The estimated cost of Rs 86,78,500, however, the cost doubled during execution of the project. The 96.54 km (59.99 mi) line was opened for traffic November 9, 1903. Because of the high capital and maintenance cost, coupled with peculiar working conditions, the Kalka–Shimla Railway was allowed to charge fares that were higher than the prevailing tariffs on other lines. However, even this was not good enough to sustain the company and then, the Government had to purchase it on January 1, 1906 for Rs 1,71,07,748. In 1905 the line was regauged to 2'6" gauge under guidelines from the Indian War Department seeking to ensure uniformity in all imperial narrow gauge systems. Ordinary local train halts at the Solan Station.
In mid-August 2007, the government of Himachal Pradesh declared the railway a heritage property in preparation for its review in September.
On this route a city named Solan is passed through, which is also known as mini Shimla. During summer season a festival celebrating a goddess (Shoolini Devi), after which the city is named, is held in June.
For about a week starting on September 11, 2007, an expert team from UNESCO was on a visit to the railway to review and inspect the railway for possible selection as a World Heritage Site. On July 8, 2008, the Kalka–Shimla Railway was included in the UNESCO World Heritage List as part of the World Heritage Site Mountain Railways of India. The Mountain Railways of India (including Darjeeling Himalayan Railway and Nilgiri Mountain Railway) and Chhatrapati Shivaji Terminus in Mumbai have already been declared as world heritage properties.