O Captain ! My Captain ! " is an extended metaphor poem written in 1865 by Walt Whitman , about the death of American president Abraham Lincoln . The poem was first published in the pamphlet '' Sequel to Drum-Taps '' which assembled 18 poems regarding the American Civil War , including another Lincoln elegy , " When Lilacs Last in the Dooryard Bloom 'd " . It was included in Whitman 's comprehensive collection '' Leaves of Grass '' beginning with its fourth edition published in 1867 . The poem emphasizes grief and sorrow
death of American president Abraham Lincoln
Assassination of Abraham Lincoln
O Captain! My Captain!