In August 1861, during the American Civil War, Fountain enlisted in the Company E of the 1st California Infantry Regiment of the Union Army and was elected first sergeant of his company. He took part in the 1862 recapture of the New Mexico Territory as a member of the California Column. In October 1862, he married Mariana Pérez of Mesilla. They would become the parents of four sons and two daughters. Later commissioned a second lieutenant, he was discharged on August 31, 1864. Fountain almost immediately joined the New Mexico volunteers because of the ongoing Indian Wars. In June 1865, he was seriously wounded while pursuing hostile Apaches. He spent a night trapped under his dead horse, with a bullet in his thigh, an arrow in his forearm, and another arrow in his shoulder. On his recovery, Fountain was discharged as a brevet captain.