In 1851, when Erie Railroad connected its Piermont, New York, terminus on the Hudson River with Dunkirk, New York, on Lake Erie, it was the longest railroad in the world. Erie expanded to reach Buffalo, Rochester, Cleveland, and ultimately Chicago. In the early years of the twentieth century, Erie Railroad constructed low-grade cutoffs and grade-separated main lines in western New York and Pennsylvania to improve upon its original line. Yet, Erie remained the weakest of the four main east–west trunks. In 1960, it merged with Delaware, Lackawanna & Western, and in 1976 the resulting Erie Lackawanna was melded into Conrail. Conrail had little use for the Erie route and abandoned much of the infrastructure. But New York State insisted that Conrail retain the New York portions of the Erie route, so in the 1990s, Conrail invested in Erie’s Binghamton–Hornell–Buffalo segment. However, the old main line west from Hornell to Olean, New York, and Meadville, Pennsylvania, was downgraded and portions were closed to traffic.
In 2001, Livonia, Avon & Lakeville affiliate Western New York & Pennsylvania began operations on largely dormant trackage between Hornell and Olean owned by Southern Tier Extension Railroad Authority. A year later it extended operations to Meadville. In 2003, it upgraded track and began handling through Norfolk Southern unit coal trains. In 2005, it assumed operation of the former Erie Meadville Yard and Oil City branch. Then in 2007, it acquired from Norfolk Southern former Pennsylvania Railroad trackage between Machias and Olean, New York, over Keating Summit to Driftwood, Pennsylvania.
Like other LA&L railroads, it is largely operated with secondhand Alco and Montreal Locomotive Work diesels.