The captain's ship has been through tough times, having 'weather'd every rack.' The ship is a metaphor for the United States, which has been battered with heavy loss of life and property during the Civil War. Despite the difficulties, the ship is ultimately 'anchor'd safe and sound.