William H. Longsdorff was born in Silver Spring Township, near Mechanicsburg, Pennsylvania on March 24, 1834. He was the fourth of seven children born to Adam and Mary Senseman Longsdorff. His father was a farmer and later served as Cumberland County sheriff during which time the family lived at the county seat of Carlisle. The younger Longsdorff entered Dickinson College there with the class of 1856 after education at Dickinson's preparatory school. While there, he was elected to the Belles Lettres Society, but withdrew before he took his degree. Longsdorff instead studied medicine and then dentistry in Philadelphia, graduating from the Jefferson Medical College in 1856 and from the Philadelphia Dental School the following year.
Longsdorff then went west and joined a cousin, Henry A. Longsdorff of the Dickinson class of 1851, in Bellevue, Nebraska, where he practiced medicine and served as an alderman in the new city council in 1858. He spent some time in Denver, Colorado prospecting and doctoring, but finally returned to Cumberland County to set up practice there before the outbreak of the Civil War. At the onset of war, Longsdorff mustered in during the autumn of 1861 in Harrisburg as a first lieutenant of Company I of the Ninth Pennsylvania Cavalry Volunteers. His war was an eventful one, as his regiment fought in dozens of engagements, mostly in the departments of the Cumberland and Tennessee, including Perryville, Stone River, Chickamauga, Knoxville, and Keneshaw Mountain. Longsdorff was promoted to captain in June 1862 and moved to the regimental staff as provost major in August 1864. After injury, he was discharged in January 1865 and returned to Carlisle, Pennsylvania and his medical and dental practice. Longsdorff interrupted his services when he became Cumberland County treasurer for a three-year term between 1881 and 1884. He was also a founding member of the County Medical Society.
Longsdorff married Lydia R. Haverstick of Cumberland County in April 1857. The couple had two sons and four daughters. The family had an historic impact on the future of Dickinson College when Longsdorff volunteered his daughters as qualified students for his alma mater's experiment in co-education in 1884. His eldest son, Harold, born in Nebraska, had already graduated from Dickinson in 1879. His eldest daughter, Zatae, became the first female student to graduate from the century-old institution in 1887. Sisters Hildegarde, in the class of 1888, Jessica, class of 1891, and Persis, class of 1894, all attended Dickinson in turn. Their father practiced medicine in the area, working from the same office he opened in 1859. He was an enthusiastic Mason and an active member of the Second Presbyterian Church in Carlisle. William Henry Longsdorff died in nearby Camp Hill on May 22, 1905. He was seventy-one years old.