The Intercolonial Railway of Canada was built to satisfy a condition of the Maritimes joining Confederation. Three routes were surveyed, and due to security concerns the northernmost route was selected, as it was farthest from the U.S. border.
The ICR was originally built on the broad gauge (5' 6") but was regauged in 1875. The line between Campbellton and Moncton was completed in 1875. On July 1, 1876? it was declared open between Halifax and Levis.
In 1879 the ICR bought the line from Riviere du Loup, Quebec to Chaudiere, Quebec (Point Levis) from the Grand Trunk Railway. Running rights were secured over the Grand Trunk to Montreal, finally giving a through route from Montreal to Halifax.
The European & North American Railway became part of the ICR.
In 1890 the ICR was extended to Sydney, Nova Scotia.
The Intercolonial shops and other facilities were relocated to Moncton from Shediac starting in 1872. The marshes of the Petitcodiac River were gradually filled-in, and by 1892 the downtown railway facilities occupied 77 acres. In February 1883, the original three storey brick and stone Intercolonial office building was destroyed by fire. The following year the railway replaced it with a larger red brick building on Main Street that survived until it was demolished in the 1960s as part of CN Moncton's commercial redevelopment.
Until February 1906, the downtown railway property was the site of the Intercolonial Railway shops, but on Saturday, February 24, a fire destroyed a major portion of these shops. This led to the first redevelopment of the downtown property. As the new shops were built along the Intercolonial mainline to the north adjacent to John Street, the old shop site was transformed into expanded railway yards, that would last until the 1960s when Gordon Yard was constructed and the downtown property turned over to commercial development
The Dalhousie Branch was opened on June 30, 1884. It extended from Dalhousie Junction to the town of Dalhousie. The branch is still in operation today as the Dalhousie spur of the New Brunswick East Coast Railway.
On August 14, 1888 the Intercolonial Railway issued a tender for "the construction of a Passenger Station, Freight Shed and platforms at Gloucester Junction, N.B."