Wilshire entered the Union Army as major in the One Hundred and Twenty-sixth Regiment, Illinois Volunteer Infantry, and served from July 16, 1862. Following the Siege of Vicksburg, his regiment was sent to Arkansas and on the Little Rock Campaign under Major General Frederick Steele's force. He resigned July 16, 1864 because of health reasons.