The entire poem is an extended metaphor, or figurative language that implies comparison between seemingly unlike things, for the United States after the Civil War and Abraham Lincoln's assassination. In the metaphor, the captain is Lincoln, the voyage is the war and the ship is the United States.
Answer: Whitman begins by comparing Lincoln to the captain of a ship and his army to a boat. The metaphor honors Lincoln and the army for helping defend and win the idea of freedom. Whitman ends the poem by saying that Lincoln, the captain, has died. The army and the United States have lost an important leader.