In 1861, following the outbreak of the Civil War, Nagle was commissioned as the colonel of the 6th Pennsylvania Infantry, a regiment with a three-month term of enlistment.
In 1864 he organized the 149th Pennsylvania Infantry for 100 days' service, became its colonel, and guarded the approaches to Baltimore, Maryland, until the expiration of his service.