While a resident of Greenleaf Township, William was awakened at four in the morning of August 18, 1862, and was told of the Acton Massacre. He took his wife and ten-months-old child to St. Paul for safety and then he went to Hutchinson, where he helped defend the stockade against the Indians. He stayed there that fall. He then went to Minneapolis, where he made his home until March 1864, and then returned to Meeker County. In the spring of 1870, he moved to Litchfield and he had a general store at 229 North Sibley. It was in a thirty-two by fifty-foot two-storied building, costing $1700 to build. Greenleaf sold it to B. L. Perry and Company in the fall of 1870. In the fall of 1870, Greenleaf was elected to be a representative in the State Legislature. In 1871, he represented Kandiyohi, McLeod, Meeker, Monongalia (defunct), and Wright counties. From 1872 to 1882, he represented only Meeker County.