No. 5017 was built by Baldwin Locomotive Works in 1944 during World War II. The 5017, along with the 5011 Class 2-10-4's, were nicknamed "War Babies" by the AT&SF. It entered service on July 20 of that year and was assigned to freight service on the Pecos division, the Mountain Division of New Mexico. The 5017 operated between Belen, New Mexico, Waynoka, Oklahoma, and La Junta, Colorado. Between 1953 and 1955, No. 5017 was used in extra service on the Pecos division in eastern New Mexico to supplement diesel power during the peak movement of perishables, grains and other commodities. On July 25, 1955, No. 5017 made her last trip, tallying 755,088 miles. Then, the locomotive was retired by the AT&SF's newer, lower-maintenance Diesels.
No. 5017 was brought to the National Railroad Museum through the efforts of former director W.L. Thorton, who was the Director of Traffic for the Kimberly-Clark railway. It was formally donated on December 27, 1959, by E. Marsh, President of the Santa Fe Railway. Today, 5017 is one of 5 Surviving 2-10-4 Texas Type locomotives that were built for AT&SF.