William Troyer was born on February 26, 1832, in Port Rowan, Ontario, to John Troyer. He immigrated to America around 1851 and settled in Henry County, Illinois. He married Ione Tinker there on July 4, 1855, and they had at least four children: Ada, born around 1859; William, born around 1863; Albert, born around 1867; and Leroy, born around 1869. They lived in Annawan, Illinois, and Troyer worked as a farmer. By 1860, they owned $2,000 of real estate and $500 of personal property.
Troyer enlisted in the Union army on August 12, 1862, and he mustered in as a corporal in Company A of the 112nd Illinois Infantry on September 20. According to his service records, he was 5 feet, 8 inches tall, with brown hair and blue eyes. The regiment took part in the Knoxville campaign, the Atlanta campaign, and the Carolinas campaign. He reportedly developed piles due to exposure during the Battle of Old Town Creek in July 1864. He was eventually promoted to sergeant, and he mustered out in Greensboro, North Carolina, on June 20, 1865.
Troyer returned to Annawan after the war and resumed his work as a farmer. By 1870, he owned $9,000 of real estate and $1,000 of personal property. By 1880, he employed at least one white servant and two farm laborers. He served as a deacon in the local Baptist church, and he was reportedly “deeply interested in missionary work.” He moved to Dorchester, Nebraska, in 1884. He applied for a federal pension in September 1890 and eventually secured one. His health deteriorated in the late 1890s, and he died in Friend, Nebraska, on October 13, 1899.