At age 14, Lanier's family sent him to Oglethorpe College in Milledgeville, Georgia. After graduating with high marks at the age of 18, Lanier was offered a tutorship at the college. However, the outbreak of the Civil War changed his plans for him. In 1861, Lanier enlisted in the Confederate Army, serving alongside his brother. In 1864, Federal troops captured Lanier, and he spent five months as a prisoner of war, during which time he contracted consumption (tuberculosis).
Following the war, Lanier used his experiences as a soldier to write Tiger Lilies, delving into the hardships and pain of war. The years 1874 through 1879 were Lanier's most prolific in his literary career. During this time, he also held the position of first flute in the Peabody Symphony Orchestra in Baltimore for seven seasons, and in 1879 he became an English lecturer at John Hopkins University. By 1880, when Lanier wrote his final poem, Sunrise, he was already quite unwell. On September 7, 1881, Sidney Lanier died in Lynn, North Carolina.