Spanish Fork was settled by Mormon pioneers in 1851. Its name derives from a visit to the area by two Franciscan friars from Spain, Silvestre Vélez de Escalante and Francisco Atanasio Domínguez in 1776, who followed the stream down Spanish Fork canyon with the objective of opening a new trail from Santa Fe, New Mexico, to the Spanish missions in California, along a route later followed by fur trappers. They described the area inhabited by native Americans as having "spreading meadows, where there is sufficient irrigable land for two good settlements. Over and above these finest of advantages, it has plenty of firewood and timber in the adjacent sierra which surrounds its many sheltered spots, waters, and pasturages, for raising cattle and sheep and horses."
In 1851 some settlers led by William Pace set up scattered farms in the Spanish Fork bottom lands and called the area the Upper Settlement. However, a larger group congregated at what became known as the Lower Settlement just over a mile northwest of the present center of Spanish Fork along the Spanish Fork River. In December 1851 Stephen Markham became the branch president of the LDS settlers at this location.
In 1852 Latter-day Saints founded a settlement called Palmyra west of the historic center of Spanish Fork. George A. Smith supervised the laying out of a townsite, including a temple square in that year. A fort was built at this site. A school was built at Palmyra in 1852. With the onset of the Walker War in 1853, most of the farmers in the region who were not yet in the fort moved in. Some of the people did not like this site and so moved to a site at the mouth of Spanish Fork Canyon where they built a structure they called "Fort St. Luke". Also in 1854 there was a fort founded about south of the center of Spanish Fork that later was known as the "Old Fort".
Between 1855 and 1860, the arrival of pioneers from Iceland made Spanish Fork into the first permanent Icelandic settlement in the United States. The city also lent its name to the 1865 Treaty of Spanish Fork, where the Utes were forced by an Executive Order of President Abraham Lincoln to relocate to the Uintah Basin.