William grew up on his father’s farm where he was born, near Hopkinton, Massachusetts. In 1836 he proceeded to Georgetown, Massachusetts, and finding employment in a shoe factory there, remained about ten years. Also in 1836, William married Louisa Bartlett. Their daughter Sarah Louise Hayward was born in 1838. Louisa died in 1840.
Learning of the 1848 finding of gold in California, Hayward booked passage on the steamer Unicorn which set sail on April 23, 1849, steamed through the Strait of Magellan, and arrived in San Francisco on August 31, 1849. Proceeding to the gold fields, he "mined as long as his money lasted" and then returned to the San Francisco Bay Area, a disappointed gold seeker. For a while, William squatted on Guillermo Castro's ranch, in Palomares Canyon. Castro tried to evict him, but William persuaded him otherwise by making him a pair of boots. His stubbornness and shoe-making ability convinced Castro to hire him. William set up a small store and saved up enough money to buy of Castro's land including what is now the downtown Hayward area. On this land, he established a store and a small dairy operation. This land was along the road that ran from San Jose to Oakland. Castro emigrated to Chile with most of his family in 1864, after he lost his land in a card game. His ranch was split up and sold to various locals, William among them. He constructed a resort hotel on what is now the northeast corner of Main and A Streets, which eventually grew to a hundred rooms. The surrounding area came to be called "Haywards" after William's hotel which bore the name "Haywards Hotel".
Haywards Hotel
Haywards Hotel became a destination for travelers and tourists. It grew to be four stories. Inside the grand building was a large lobby, reception rooms, dining halls, and sitting and card rooms. The hotel also served as a post office. The main force behind the success of Haywards Hotel wasn't William Hayward, but his wife Rachel, who arranged and managed parties, receptions, picnics, rides, and entertainment for guests. The hotel was destroyed by fire in 1923.
Town of Haywards
William then became the road commissioner for Alameda County. He used his authority to influence the construction of roads in his own favor. In 1876, the town was chartered under the name of "Haywards". However, it was not legal to name a post office after a living person, so the official name was "Haywood". In 1876, "Haywood" was incorporated as the "Town of Haywards", with a population of 1,100. William served two terms on the Alameda County Board of Supervisors. On April 5, 1866, William married Mrs. Rachel Rhodes Bedford, a widow, in Haywards. Rachel had a daughter from her first marriage, Mary E. Bedford. William and Rachel had one child together, William Martin Hayward. William Hayward died at age 75, as a result of skin cancer, at Haywards Hotel, and was buried in Lone Tree Cemetery in Fairview, near Hayward. According to his tombstone, William died on July 10, 1891. Also buried there, according to the tombstone, were "Rachel H. Hayward" described as "Mother of Hayward" who died at age 86, William Martin Hayward the "only son of William and Rachel Hayward" who died on November 20, 1893 "aged 26 years 8 months 14 days", and Sarah Louise Hayward, William's daughter by his first wife.