The tunnel opened in 1874 as part of the Balerno branch line. It cut the journey time from Slateford to Princess Street to only 15 minutes, something that used to take an hour on horseback.
At its peak between 1900 and 1920-21 passenger trains a day ran along the line but it suffered from increasing competition with buses and trams. Rail passenger services ceased in 1943 and the line was closed completely on 4 December 1967.
The tunnel was closed and bricked up until 1980 when the Watervliet walkway was created and the tunnel was reopened, painted and lit.
The tunnel suffered from a period of decline and became dark and worn and deteriorated and was subject to a refurbishment organised by a community group focusing on putting in a mural along the length of the tunnel.