In Ambrose Bierce's short story, "An Occurrence at Owl Creek Bridge," Peyton Farquhar is a pillar of the American South, which, during the period in question, the Civil War, can be roughly translated to mean a wealthy, upstanding citizen of the Confederacy, and an opponent of the abolitionist movement. Early in his story, Bierce provides the following description of his protagonist who, in the story's opening passages, is about to be executed by hanging:
"The man who was engaged in being hanged was apparently about thirty-five years of age. He was a civilian, if one might judge from his habit, which was that of a planter. . .Evidently this was no vulgar assassin."
Bierce goes on to expand upon his description of Peyton Farquhar, noting that this figure "was a well to do planter, of an old and highly respected Alabama family," and that, being "a slave owner and like other slave owners a politician, he was naturally an original secessionist and ardently devoted to the Southern cause." Bierce notes that Farquhar envisioned himself at one point as a soldier in the cause of the Confederacy, but one whose martial interests were impeded for reasons that are extraneous to the narrative.
In section II of his story, Bierce provides background to explain Farquhar's predicament as referenced in the narrative's opening passages, describing the main protagonist's encounter with a grey-clad soldier, presumably a Confederate soldier fighting on the same side of this conflict as that to which Farquhar's sympathies lie. It is soon revealed, however, that this grey-clad soldier is with the Union and has essentially set-up the well-to-do southerner as a presumed saboteur. The "Federal scout" does this by planting in the mind of Farquhar the suggestion of setting fire to the Owl Creek bridge, a key structure important to the movement of Union troops as they advance across the South:
The soldier reflected. "I was there a month ago," he replied. "I observed that the flood of last winter had lodged a great quantity of driftwood against the wooden pier at this end of the bridge. It is now dry and would burn like tinder."
The answer to the question -- why was Peyton Farquhar hanged -- lies in this suggestion cynically offered by the Federal spy. Farquhar takes the bait, so to speak, and attempts to burn the bridge to prevent its exploitation by northern soldiers.