In the coming years he would be a U.S. Senator for Mississippi and Secretary of War under President Pierce (1853-1857). In February 1861, he reluctantly accepted the position of provisional president of the Confederacy; he was officially elected president six months later. He was captured by Union forces on May 10, 1865 and held in prison for two years at For Monroe, Virginia. After the war he and his wife traveled to Canada, Europe and Cuba. In 1881 he wrote The Rise and Fall of the Confederate Government, a defense of his actions and that of the Confederate cause. This work helped revive his reputation. He spent the later years of his life at an estate called Beauvoir on the coast of Mississippi. He died while in New Orleans in 1889.