The constituent general meeting of the SMB took place on 30 April 1899, but for various reasons including difficulties in securing funding, construction did not begin until 1903. Construction finally started on 28 December 1903. Construction of the line proved to be difficult as, on the one hand, the terrain to be built on was unstable and it was repeatedly affected by landslides, and, on the other hand, the construction of 84 significant structures was required on the short line. The building material for these structures mainly came from the quarries in Lommiswil and Gänsbrunnen. The largest construction siteon the line was the future station area in Oberdorf, because the Weissenstein Tunnel was built from there. As occurred at other tunnel construction sites in Switzerland, a temporary settlement was built nearby for the tunnel workers. During the construction of the line there were two fatalities at the Geissloch viaduct construction, but the exact causes are unknown. When operations began in 1908, construction work had not been completed. In particular the problems with the landslides had not been solved, which meant that the work was not completed until 1909.
First years of operation
Because the operation of the line would not have been profitable due to its short length, the Solothurn-Münster-Bahn transferred operations on to the line before the inauguration of the line to the Emmentalbahn, which also terminated in Solothurn. The line was opened on 3 August 1908. Construction had not been completed due to landslides and various other interruptions to works. Traffic initially developed well, mainly due to freight traffic, which mainly served Von Roll and the Swiss Army. The beginning of the First World War also strongly affected operations on the line, so passenger services had to be severely restricted and the planned freight operations were completely abandoned because more extensive operations were no longer possible due to sharply increased coal prices. Although the timetable of 1921 showed the same number of services as before the war, the frequencies decreased, mainly because road transport was gradually becoming competitive. The line retained a certain importance for through traffic.
Electrical operations under the usual Swiss Federal Railways AC system of 15 kV at 16⅔ Hz was recorded on 2 October 1932, leading to an increase in passenger service frequency. The outbreak of the Second World War in 1939 had a major impact on the line from Solothurn to Moutier, as the Swiss Army made great use of the line for passenger and freight traffic. However, international through traffic collapsed in 1940. The war traffic ended from 20 August 1945.
Post-war period
The recommissioning of the line was initially slow and it only regained a certain importance, this time touristic, with the opening of the Oberdorf–Weissenstein chairlift in 1952, the terminal station of which is located in the Oberdorf station area. The further significance of the line at this time was limited to its function as a feeder to the regional centres of Solothurn and Moutier. As a result, operations have focused on commuter traffic since the 1960s.
Rejected closure
In 1978, the final report of the commission for the Swiss transport concept was published, which recommended that the line be converted to bus operation and that the Weissenstein tunnel be converted into a road tunnel. However, the Federal Office of Transport and the Canton of Solothurn rejected these measures in 1984, mainly because the line was still of some importance for through freight traffic and major renewal of the infrastructure was not necessary.
Since 1997
The joint operations with the EBT and the VHB—headed by the EBT as the largest of the three companies—was merged into the Regionalverkehr Mittelland company on 1 January 1997. The RM merged with the BLS Lötschbergbahn on 27 June 2006 to form BLS AG. Since the timetable change of December 2010, the passenger services on the line, which is owned by the BLS, are operated by the SBB. This happened in return for the takeover of SBB services in the Lucerne area by the BLS. Since 2013, the line has been on the Federal Office of Transport's list of lines that have a cost recovery ratio of less than 30 percent. In 2017, the Federal Office of Transport decided that the Weissenstein Tunnel should be rehabilitated from 2020 to ensure operations for a further 25 years.