Stephen D. Lee was born in Charleston, the son of Dr. Thomas Lee, a physician, and Caroline Allison. His family was distantly related to the Lees of Virginia. In 1850, Lee received an appointment to the US Military Academy at West Point where he graduated seventeenth of forty-six in the class of 1854. After seven years of service in artillery and staff positions, he resigned his US Army commission in February 1861 to enter Confederate service. As an aide to Confederate General P.G.T. Beauregard, he delivered the ultimatum to evacuate Fort Sumter to Major Robert Anderson before the Confederates began their bombardment on April 12, 1861. He was also a member of the party that negotiated the evacuation of Fort Sumter on April 13, 1861. Lee was then elected captain of the artillery battery of the Hampton Legion, but the late delivery of its cannon prevented the battery from traveling with the legion to First Manassas. In autumn, the legion added additional artillery, and Lee was promoted to major. Throughout the spring and summer of 1862, he received additional promotions for his leadership and artillery skills during the Peninula Campaign, the Seven Days' campaign, Second Manassas, and Sharpsburg (Antietam).
Promoted to brigadier general, Lee was sent west to command artillery as the Confederacy attempted to stop the Union from seizing control of the Mississippi River. He gained a decisive victory over General William T. Sherman at Chickasaw Bayou, led an infantry brigade at Champion's Hill, and participated in the failed defense of Vicksburg, where he was captured on July 4, 1863. After being exchanged, he was promoted to major general and placed in command of all cavalry in Mississippi and Tennessee. In July 1864, Lee was promoted to lieutenant general and given Hood's Corps in the Army of Tennessee, then defending Atlanta. His corps fought at Ezra Church, then lost heavily at Jonesboro as Atlanta began to fall. In the subsequent Nashville campaign, Lee suffered a leg wound in December 1864. During his recovery in Columbus, Mississippi, he married Regina Lilly Harrison of that city on February 8, 1865. The couple had only one child. After recovering from his wound, Lee returned to duty in the final battles in North Carolina.
After the war, Lee returned to Mississippi, where he farmed. In 1878, he was elected to the Mississippi Senate, and two years later he became the first president of the Mississippi Agricultural and Mechanical College (later Mississippi State University). He entered the race for governor in 1890 but withdrew at the request of his board of trustees. In addition to his work at the university, Lee served for ten years as president of the Mississippi Historical Society. In 1889, he was involved in the founding of the United Confederate Veterans organization, and in 1895 he helped to organize the Vicksburg National Military Park Association, serving as its first president. Lee, a prominent Confederate general, took up the battle for memory of the Civil War in these years, helping solidify the Lost Cause and glorifying the short-lived Confederacy. Lee died in Vicksburg in 1908.