Lamy is part of the Santa Fe, New Mexico, Metropolitan Statistical Area. The population was 218 at the 2010 census. The former Atchison, Topeka, and Santa Fe Railroad (ATSF), now the Burlington Northern Santa Fe (BNSF), passes through Lamy. This railroad, usually called just the "Santa Fe," was originally planned to run from Atchison, Kansas, on the Missouri River, to Santa Fe, the capital city of New Mexico, and then points west. However, as the tracks progressed west into New Mexico, the civil engineers in charge realized that the hills surrounding Santa Fe made this impractical. Hence, they built the railway line though Lamy, instead. Later on, a spur line was built from Lamy to Santa Fe, bringing the railroad to Santa Fe at last. In 1896 the Fred Harvey Company built the luxurious El Ortiz Hotel here. Thus Lamy became an important railroad junction. In 1992 the spur line was taken over by the Santa Fe Southern Railway, which operates a popular excursion train, using vintage passenger railcars and modern freight cars, between Santa Fe and Lamy.

The significance of Lamy as a railroad junction is related in the Oscar-nominated documentary, The Day After Trinity (1980), about the building of the first atomic bomb, and is referred to by instrumental group the California Guitar Trio in a five-part suite Train to Lamy on their second album Invitation (1995).