On October 1, 1862 he enlisted in the Union Army and, nine days later, was commissioned as captain of Company G, 28th Maine Volunteer Infantry.
In October 1864, Thompson rejoined the Union Army and was commander of the 7th Company Unassigned Maine Infantry Volunteers which was organized at Augusta and served from November 2, 1864 at Fort Popham in Phippsburg, Maine guarding the approaches to the key shipbuilding city of Bath.