The Midland Great Western Railway Act received the Royal Assent in July 1845, authorising it to raise £1,000,000 capital and to build a railway from Dublin to and and to buy the Royal Canal. Construction of the main line began from Dublin in January 1846 and proceeded westwards in stages, supervised by chief engineer G. W. Hemans. It opened from as far as Enfield in May 1847, to in December 1847 and to Mullingar in October 1848.
Dublin to Galway
Rivalry existed between the MGWR and the GS&WR, each of which wanted to build the line to. The MGWR extended its line from Mullingar and the GS&WR from its line at. The MGWR was first, going via and reaching Galway, from Dublin, in August 1851. It was not until 1859 that the GS&WR got as far as Athlone. The GS&WR was obliged to operate its service over MGWR track between Athlone and Galway, paying the MGWR 65% of passenger and 55% of goods receipts. The GS&WR retained a separate station, which is now the sole operating station, as the last service to the MGWR station ran on 13 January 1985.. The branch is to be made into a rail trail as part of the Dublin-Galway Greenway by 2020.
In 1890 the Government granted the MGWR £264,000 to build a railway to Clifden on the Atlantic coast of County Galway. It opened as far as Oughterard in January 1895 and to Clifden in July 1895. Due to its inland route it did not serve the bulk of the area's population, so the GSR closed it in 1935. A similar branch line was built at the same time from Westport to Achill on the Atlantic coast of County Mayo. The MGW built the first section, opening it as far as Newport in February 1894 and Mulranny in May 1894. The Board of Works built the section from Mulranny to Achill, which opened in May 1895. The GSR closed the line in 1937.
Branch lines
At its peak the MGWR had a number of branch lines:
Locomotives and rolling stock were maintained at MGWR's Broadstone works in Dublin.
Livery
The MGWR painted all of its locomotives bright emerald until about 1902, when the first of the new Class A 4-4-0 express locomotives were outshopped in royal blue. This did not wear well and in 1905 the company adopted grass green. From about 1913 locos were painted gloss black until the MGWR became part of the GSR in 1925. From then on, all locomotives were gradually repainted plain unlined dark grey. Passenger coaches were finished in varnish or brown paint until the blue livery was introduced in 1901. As on the locomotives this weathered badly and from 1905 the MGWR reverted to brown, which after 1910 was not so well-adorned with lining. From October 1918 coaches were painted a very dark Crimson and after 1924 the GSR used a similar shade for some years.
Preservation
No MGWR locomotive has been preserved but several of its six-wheeled carriages exist.
No. 84 - Clifden. Intended to be restored as part of the Station House Hotel's collection.
Present day
Those of the former MGWR's main lines that are still open are owned and operated by Iarnród Éireann. Routes between Dublin and Sligo, Athlone and Galway, Athlone and Westport and the Ballina branch remain open to passenger traffic. The Meath on Track campaign is campaigning to have the Navan — Clonsilla line reopened earlier than the 2030 date announced under current Iarnród Éireann policy. The Edenderry, Clifden, Achill, Cavan, Killeshandra, Ballaghaderreen branch line, Ballinrobe, Killala and Loughrea branches lines are all closed. Rail Users Ireland has proposed running some Galway — Dublin services via the MGWR station in and the disused route via to Mullingar, reinstating the route of the first MGWR service via the former GS&WR line. The current Galway service runs from. This proposal will not go ahead as the railway will be replaced with the Dublin-Galway greenway in 2020. Three former MGWR stations are now hotels, two of which are called the "Station House Hotel" but are unconnected by ownership. They are the much-expanded former Clifden station in Co. Galway, Kilmessan Junction in Co. Meath and the Mullranny Park Hotel at Mulranny, Co. Mayo. The Great Western Greenway is a greenway rail trail that uses the route of the former Westport — Achill branch line.