Edward Olcott Shepard was born on November 25, 1835, in Hampton, New Hampshire, to John W. Shepard and Eliza Burns. His father was a minister who owned $2,400 of real estate by 1850. He grew up and attended school in Nashua, New Hampshire, before enrolling at Amherst College. He graduated in 1860 and spent the next two years working as a high school principal in Concord, Massachusetts.
In June 1862, he received a commission as a 1st lieutenant in Company G of the 32nd Massachusetts Infantry. The regiment took part in the Battle of Antietam, the Battle of Fredericksburg, the Battle of Chancellorsville, the Battle of Gettysburg, the Overland Campaign, the siege of Petersburg, and the Appomattox campaign. He was promoted to major in June 1864. He was wounded at least three times: at Gettysburg on July 2, 1863; at Petersburg on June 18, 1864; and at Hatcher’s Run on February 6, 1865. Confederate forces captured him at Hatcher’s Run, and he spent the next few weeks imprisoned. He was exchanged on February 23, 1865, and he mustered out on June 29, 1865.
He settled in Boston, Massachusetts, after leaving the army, and he earned a living as a lawyer. He married Mary Lunt on June 18, 1874, and they had at least four children: Mary, born around 1876; Edward, born around 1876; Ralph, born around 1878; and Allen, born around 1885. They moved to Newburyport, Massachusetts, in the 1870s, and he employed at least three servants. He supported the Republican Party, and he served several terms on the Boston City Council. He also served as judge advocate general under Governor Oliver Ames and Governor John Q. A. Brackett. He died of a cerebral hemorrhage in Newburyport on April 27, 1903.