Union Pacific Northwest Line

The Union Pacific Northwest Line (UP-NW) is a commuter rail line provided by Metra and operated by the Union Pacific Railroad in Chicago, Illinois and its surrounding suburbs. While Metra does not refer to any of its lines by colors, the timetable accents for the Union Pacific Northwest Line are bright "Viking Yellow," honoring the Chicago & North Western Railway's Viking passenger train.

The line runs from Ogilvie Transportation Center to Harvard, Illinois. However, most trains terminate in Crystal Lake, Illinois. A branch line to McHenry, Illinois operates during weekday rush hours in the peak direction. Overall, this is Metra's longest route and one of three routes with branches (the others being the Rock Island District and Metra Electric District). The line is Metra's second busiest with an average of 38,600 boardings on a weekday. It is second only to the BNSF Line.

As of February 16, 2024, Metra operates 78 trains (39 in each direction) on the line on weekdays. Of these, 14 inbound trains originate from, three from , 13 from , four from , one from , and four from. Five outbound trains terminate at Des Plaines, three at Palatine, three at Barrington, 12 at Crystal Lake, three at McHenry, and 13 at Harvard.

Metra operates 34 trains (17 in each direction) on the line on Saturdays. Of these, 10 inbound trains originate from Harvard, five from Crystal Lake, one from Barrington, and one from. Two outbound trains terminate at Barrington, five at Crystal Lake, and 10 at Harvard.

Metra operates 21 trains (10 inbound, 11 outbound) on the line on Sundays. Of these, seven inbound trains originate from Harvard, two from Crystal Lake, and one from Arlington Heights. Three outbound trains terminate at Crystal Lake and eight terminate at Harvard.

There is no service at station or on the McHenry branch on weekends or holidays. All other stations are open daily.

The main line is triple-tracked from to just southeast of Barrington, with a bidirectional express track, and double tracked from Barrington to Harvard. The McHenry branch is single-tracked. Historically, double track was maintained from Harvard to Baraboo, Wisconsin. A now-gone portion of the Union Pacific Northwest Line diverged at Harvard and passed through Beloit, Wisconsin, and reconnected to the main line at Evansville junction to allow a separate passenger and freight line. Around the time the Beloit line was abandoned, the railroad single-tracked the line from Harvard to Janesville.

Metra has included the possibility of extending the McHenry branch to Johnsburg in their Cost Benefit Analysis report. If this were to happen, the branch would open an infill station in Prairie Grove. Additionally, an infill station would open in Ridgefield between Crystal Lake and Woodstock along the line to Harvard.

By the first quarter of 2024, the Union Pacific Railroad is expected to transfer operations of the three Union Pacific lines to Metra. The Union Pacific will continue to own and maintain the right-of-way.

Ridership
Between 2014 and 2019, annual ridership declined from 11,609,358 to 10,384,356, an overall decline of 10.6%. Due to the COVID-19 pandemic, ridership dropped to 2,602,403 passengers in 2020.

McHenry branch
The branch, which formerly had service north to Williams Bay, branches off from the main line north of Pingree Road.