Elroy was for many years an important railroad hub in the area. The Baraboo Air Line reached Elroy in the 1870s. The Air Line was later acquired by the Chicago and North Western Railway and the line was pushed on to Sparta, Wisconsin. It eventually became the main line of the CNW between Chicago, Illinois and Winona, Minnesota. The Chicago, St. Paul, Minneapolis and Omaha Railway also became a presence in Elroy when its line was built from St. Paul, Minnesota, south through Camp Douglas, Wisconsin. Both railroad companies kept roundhouses and other operations in Elroy. Rail traffic on the Elroy portion of the CNW eventually declined, due to the construction of better mainline trackage further to the north (via Adams, Necedah, and Wyeville). The rails on this portion were taken up in the mid-1960s and the right-of-way was converted into the Elroy-Sparta Bike Trail, as it remains today. The CNW tracks from Elroy southeast to Reedsburg, Wisconsin, along with those of the north-south Omaha line, were taken up in the 1990s, and these rights-of-way are now known as the "400" State Trail, and the Omaha Trail, respectively.