The Carnarvonshire Railway was a railway connecting Caernarfon railway station (L&NWR) (terminus of the Bangor and Caernarvon Railway line from Bangor) with Afon Wen. It was later operated by the LNWR then the LMS. At Afon Wen, a junction connected with the Cambrian Line (GWR) to Pwllheli in one direction and to Porthmadog in the other, with LNWR/LMS running rights to both. The line had two branches, one from Caernarfon to Llanberis, which was built by the Carnarvon to Llanberis Railway and the other from Penygroes to Talysarn (Nantlle), which formed part of the narrow gauge Nantlle Railway, which between Penygroes and Caernarfon had been incorporated into the Carnarvonshire Railway. Regular passenger service on the Llanberis branch ceased in the 1930's (but summer passenger excursions from Llandudno etc. continued until the 1960's]]. Likewise the Talysarn branch passenger service ceased early. The remaining lines and services were shut completely as part of the Beeching Axe as follows:
- Afon Wen to Caernarfon - December 1964
- Llanberis to Caernarfon - December 1964
- Caernarfon to Menai Bridge (Bangor) - Autumn 1969.
A section of the line from Caernarfon to Dinas, was incorporated into the reopened narrow gauge Welsh Highland Railway as the first phase of the line, in 1997. Several miles of the trackbed southwards from Dinas have been used to improve the A487 road. Some original sections remain and have been used as part of National Cycle Route 8.
The cycle route (Lôn Eifion) and the narrow gauge railway share the old trackbed south of Caernarfon to Dinas.