text: Nilson was born in Skönberga parish in Östergötland, Sweden. Later his family relocated to the island of Gotland, where his father, Nikolaus, owned the farm Rosendal in Follingbo. During later life, Lars Fredrik Nilson retained a small holding on Gotland, which he visited yearly.
  After graduating from Wisby high school on Gotland, Lars Fredrik Nilson enrolled at Uppsala University in 1859. There he studied the natural sciences including zoology and biology. His work in mineralogy was noted by the chemistry professor at Uppsala, Lars Fredrik Svanberg, a former student of Jöns Jakob Berzelius.
  To obtain a Doctorate of Philosophy in Sweden, the candidate was expected to pass a series of examinations in all areas of study, including languages, history, and philosophy as well as their main area of study, within a fixed period of time. In 1865, just before Nilson could complete his final examination, his father became severely ill. Nilson returned home to Gotland, where he assumed management of the farm, working in the fields as needed. When his father recovered some months later, the harvest and autumn planting had been completed successfully, and Nilson had installed the first engine threshing machine to be used in Gotland. Nilsons own health had greatly benefited from his work on the farm: the young man who had arrived home in poor health had become much stronger. He was able to return to Uppsala and pass the next seasons examinations, becoming a doctor of chemistry in 1866.