Joseph Shelley was born around 1841 in Pennsylvania to John and Catherine Shelly. His father was a shoemaker who owned $1,200 of real estate and $300 of personal property by 1860. He grew up and attended school in Richland, Pennsylvania.
He enlisted in the Union army on August 16, 1861, and he mustered in as a private in Company F of the 42nd Pennsylvania Infantry. The regiment took part in the Peninsula campaign. He eventually earned a promotion to corporal, and he died in the Battle of Glendale on June 30, 1862.