Abraham Lincoln was president of the United States during the Civil War, but as The Library of Congress points out, some Southerners considered Jefferson Davis their president. The Civil War lasted from 1861 to 1865.
Gen. Robert E. Lee surrendered his army on April 9, 1865, effectively ending the war. However, according to the Civil War Trust, the last battle was fought on May 13, 1865, after Lincoln was shot April 14. Vice President Andrew Johnson became president of the United States after Lincoln's assassination.
Jefferson Davis was elected president of the Confederate States of America on Nov. 6, 1861.