In 1858 a curve was opened from the 1846 North British Railway to the South Leith branch of the Edinburgh and Dalkeith Railway.
Around 1890 Portobello [2nd] closed to allow Portobello Yard to be built on either side of the original railway. The west end of this yard occupied the site of the former station. The passenger lines were re-aligned to the south edge of the yard and a new Portobello [3rd] station opened. (Portobello West Junction, directly at the west end of the new station, is where the deviation began).
The signal box controlling access to the South Leith line was renamed from 'Portobello' to 'South Leith Junction ' around 1900.
The box was replaced with the main line was quadrupled with an addition two lines (for goods) being laid to the north of the existing railway between Piershill Junction and Portobello in 1909.
In 1912 the South Leith branch was doubled and in 1915 the Lothian Lines (North British Railway) opened. A part of this network opened from South Leith Junction to run round the north side of Portobello Yard, cross over the main line at Portobello East Junction and Waverley Route at Joppa [1st] to reach Brunstane Park Junction.
With a decline in traffic the Brunstane Park Junction line was closed in 1967 and South Leith Junction box closed.
Much of Portobello Yard was closed in 1962 and 1963 with the opening of Millerhill Marshalling Yard (British Railways) and today the location has a much simpler layout. The junction for South Leith is now at Portobello Junction (formerly Portobello East Junction.