Henry B. Swartz was born on May 21, 1842, in Pennsylvania to Joseph and Sophia Swartz. His father was a farmer who owned $2,000 of real estate and $850 of personal property by 1860. He grew up and attended school in Bucks County, Pennsylvania, and by 1860, he was working as a farm laborer.
He enlisted in the Union army on August 15, 1862, and he mustered in as a private in Company F of the 128th Pennsylvania Infantry. The regiment took part in the Battle of Antietam. He died near Stafford Court House on January 29, 1863.