The main theme of "An Occurrence at Owl Creek Bridge" is death, both the way humans seek to avoid death and their own mortality and the nature and experience of death itself.
In the moments before his death, Confederate sympathizer and saboteur Peyton Farquhar imagines a scenario in which he escapes his hanging, swims to safety amid gunfire, and makes a long journey to his home and loving wife. This scene is only revealed to be a daydream at the end, when the narrator describes the moment of death and states,
Peyton Farquhar was dead; his body, with a broken neck, swung gently from side to side beneath the timbers of the Owl Creek bridge.
In Farquhar's fantasy, Bierce explores the human desire to avoid death. Farquhar's case is hopeless: he has been caught by the enemy, he has a noose around his neck, and his execution at the hands of the Union is moments away. Yet in his final moments of consciousness, he imagines escaping.
Bierce also highlights the nature and experience of death itself in this story. Readers may well ponder if they, too, would imagine scenarios moments before their death. But before his escapist fantasy, Farquhar seems to feel that he should spend the moments before his death in a certain way:
He closed his eyes in order to fix his last thoughts upon his wife and children. The water, touched to gold by the early sun, the brooding mists under the banks at some distance down the stream, the fort, the soldiers, the piece of drift—all had distracted him.
This quote clearly demonstrates the finality and almost ceremonious solemnity with which humans see death's nature. Farquhar feels that he should spend his last moments of consciousness thinking about what is presumably most important in his life: his family. To spend these "last thoughts" on the "distractions" of the scenery seems wasteful and wrong to him, given the solemn nature of death.
Farquhar's experience of death is depicted in minute detail, from the way he seems to sense his life ticking toward a close with the sound of his watch to the way he seems to perceive time as passing slowly as he watches the stream below him. The author even imagines what the experience of the moment of death itself would be like for a person being hanged:
he feels a stunning blow upon the back of the neck; a blinding white light blazes all about him with a sound like the shock of a cannon—then all is darkness and silence!