Foster was born March 4, 1815 in Petersham, Massachusetts where his father, Festus Foster was a minister. When Festus quit the ministry in 1818, the family moved to Brimfield, Massachusetts. Wells was educated locally, spent a year at Wilbraham Academy and then entered Wesleyan University in 1831. After graduating with honors in 1834, he studied law in Zanesville, Ohio and was admitted to the bar.
In 1837 the Ohio legislature authorized a geological survey of the state to be led by William W. Mather. Foster had studied under Mather at Wesleyan, and accepted an invitation to join the survey. Foster was assigned to a district in the central part of the state and mapped the area's basic stratigraphy. In particular he noted the area held extensive coal reserves. He also discovered the fossilized bones of mastodons and a species of giant beaver which he named Castoroides ohioensis. The survey lasted only eighteen months but made significant contributions towards understanding the basic geological structure of the state.
When the survey ended, Foster continued to investigate the Ohio coal fields on behalf of several mining companies. In 1847 Foster and Josiah Dwight Whitney were hired to assist Charles T. Jackson in making a federal survey of Michigan's Upper Peninsula, which was about to become a major copper and iron mining region. The survey was poorly managed by Jackson and when he was dismissed, Foster and Whitney were asked to complete the effort. The final reports were published under their names in 1850 and 1851. In 1851 they made a well-received presentation of their findings to the American Association for the Advancement of Science.
Afterwards Foster returned to Brimfield and became involved in politics. He was a prominent member of the Know-Nothing movement, an organization opposed to immigrants and Catholics. When the party split over the question of slavery, Foster worked with Henry Wilson, a noted abolitionist, to organize the Republican party in Massachusetts. In 1855 Foster ran for Congress as a Republican and was narrowly defeated by Calvin C. Chaffee.
In 1858 he settled in Chicago where he remained for the rest of his life. For a time he worked in the land department of the Illinois Central Railroad but then joined the faculty at the Old University of Chicago where he served as a professor of natural history. Foster had been interested in archaeology since his work on the Ohio geological survey and spent many years studying the remnants of the Indian mound builders culture. Just prior to his death in 1873, he published Prehistoric races of the United States of America which laid out the results of his studies of the mound builders.
Foster was elected president of the American Association for the Advancement of Science in 1869 and served for three years as president of the Chicago Academy of Sciences. He died on June 29, 1873 of inflammation of the liver.