Dante ironically praises Florence, because its fame spreads throughout not only earth, but hell as well. He says that he saw five Florentines among the thieves and is ashamed for his city. Virgil leads Dante back up to the bridge, so that they can head for the next trench.
Dante and Virgil take the dangerous climb up some rocks and Dante can see the eighth trench lit up by many small, twinkling fires. Dante compares the small, moving fires to fireflies and then to Elijah's flaming chariot that rose to heaven. Virgil tells him that under each flame is a tortured soul.
Dante compares this amazing sight to both Biblical and more everyday imagery, trying to find some way to express its strangeness.
Dante sees a flame split in two and asks who is under that flame. Virgil tells him that it is Ulysses and Diomedes. In Homer's Iliad these two heroes fought together in the Trojan War and stole the city's palladium (a sacred religious object). They also both participated in the trickery of the Trojan horse. They now pay for their deceit here.
Dante's incorporation of these two heroes from the Trojan War into his story is also an incorporation of the two most important epics in the western tradition: Homer's Iliad (in which Ulysses and Diomedes are prominent) and Odyssey (which centers around Ulysses). By including them in his poem, Dante elevates himself to the level of the great poet Homer—perhaps even above it. Further, by incorporating these two heroes into hell he asserts the preeminence of God's moral order over the morality of the ancient Greeks.
Dante eagerly asks Virgil if he can speak to the two heroes. Virgil agrees that this would be good, but tells Dante to let him talk to them. Virgil addresses the dual flame and asks one of them to describe his final voyage. Ulysses answers and the flame flickers like a speaking tongue, giving forth a voice.
Virgil's eloquent speech compels Ulysses to tell his story.
Ulysses says that when he returned home from his long voyage from Troy, after being detained by the witch Circe, he still had an urge to travel and explore. This urge trumped any love he felt for his father, son, or wife, from whom he had been separated for twenty years, so he set out on another voyage to explore the world. Ulysses and his crew sailed past Spain, past the Pillars of Hercules (between Spain and Morocco), into the open Atlantic.
While nothing more than a flame, Ulysses still retains the power of his voice. This is important both because it allows him to include his story in Dante's narrative and because Ulysses is best known in Homeric epic for his clever, persuasive way with words.
Ulysses told his men that they would explore the world beyond the sun (the Western end of the Mediterranean was thought to be the end of the world at this point, long before Europeans discovered the Americas). Ulysses inspired his men with a powerful speech encouraging them to strive after knowledge and they sailed on until they found a huge mountain. But then a whirlwind came and sunk their ship, and Ulysses and his men drowned.
In order to incorporate the pagan Ulysses into his Christian poem, Dante turns Homer's great hero into a sinner. Ulysses' heroic ambition becomes sinful arrogance, as he seeks here to surpass the bounds of human experience and travel to the ends of the earth. But note that where Ulysses fails, Dante succeeds. He is able to travel beyond the limits of the earthly world while still living. Dante in some sense thus makes himself an even greater hero than the famous Ulysses.