Davis was Secretary of War under Democratic President Franklin Pierce. Both before and after his time in the Pierce administration, he served as a Democratic U.S. Senator representing the State of Mississippi. As a senator, he argued against secession, but did agree that each state was sovereign and had an unquestionable right to secede from the Union.
Davis and Pierce maintained a friendship even throughout the Civil War. Their wives were also good friends and when Jane Pierce was grieving over the death of her son Benny, Varina Davis fulfilled many of the hostess duties that the first lady normally performed. The two men corresponded even during the war. When Union soldiers found some of their correspondence in a raid on the Davis home, Pierce was accused by some of treason for this reason, but such an allegation was never substantiated and he was never formally charged.
On February 9, 1861, after Davis resigned from the U.S. Senate, he was selected provisional President of the Confederate States of America and was elected without opposition to a six-year term that November. During his presidency, Davis took charge of the Confederate war plans but was unable to find a strategy to stop the larger, more powerful and better resourced Union. His diplomatic efforts failed to gain recognition from the British nor from any other foreign country. Meanwhile, the Confederate economy collapsed, as Davis' plan of printing more and more paper money to cover the war's expenses proved to be a disastrous strategy. Historians have criticized Davis for being overbearing, controlling, micromanaging and meddlesome, as well as out of touch with public opinion.
Davis was captured on May 10, 1865 and charged with treason, though never tried. When apprehended, Davis was wearing his wife's overcoat over his shoulders. Union spin doctors falsely tried to say that Davis was wearing women's clothing when captured. He spent two years in prison before being released on bail. Many Southerners empathized with his defiance, his refusal to accept defeat, and his resistance to Reconstruction. But later in his life, Davis began to encourage reconciliation by the late 1880s, telling Southerners to be loyal to the Union. He died in New Orleans on December 6, 1889.
If you're interested in a good documentary about Davis, may I recommend Jefferson Davis: An American President, which I recently watched and found fascinating.