context: This article's plot summary may be too long or excessively detailed. Please help improve it by removing unnecessary details and making it more concise. (November 2015) (Learn how and when to remove this template message)
  During the American Civil War, Jonah Hex (Josh Brolin) served as a Confederate cavalryman until his commanding officer, Quentin Turnbull (John Malkovich), a general for the Confederates who is obsessed with the fall of the Union, ordered him to burn down a hospital. Hex refused, and was forced to kill his best friend, Turnbull's son Jeb. After the war, a vengeful Turnbull and his right-hand man, Burke (Michael Fassbender), a psychopathic sadist, tie up Hex and force him to watch as his house is burned down with his wife and son inside. Turnbull then brands Hex's face with his initials, "QT", and leaves him to die of thirst or exposure. Days later, American Indians find Jonah and revive him with their mystical powers. While they did manage to bring Jonah back from the dead, it is stated that they couldn't bring "all of him back". As a result, Jonah acquired the ability to, as long as he maintains physical contact with the corpse, temporarily resurrect and communicate with the dead; the corpse physically and mentally brought back to physical condition prior to death (apparently, only Jonah sees them restored like that. To everyone else, they continue to seem decayed and lifeless). It is also explained that the fresher the dead, the quicker that body begins to burn up as they are being touched. Once contact is broken, the corpse instantaneously reverts to its former, lifeless condition. When Turnbull apparently dies in a hotel fire, Hex satisfies his hunger for vengeance by turning to bounty hunting.
  In 1876, Hex rides into the town of Stunk Crick with four dead outlaws and demands his bounty, only to realize that the mayor and sheriff have no intention of paying, intending instead to kill Hex for his own bounty. Hex instead kills them and several sheriff's deputies, collects his bounty from the dead mayor's pockets, and leaves. In another part of the country, Turnbull, alive and well, orchestrates the hijacking of a train carrying components of a classified weapon, slaughtering its military guards and civilian passengers alike. When informed of the theft, President Grant (Aidan Quinn) surmises that Turnbull is planning a terrorist attack for July 4, during the celebration of the American centennial. Grant instructs Army Lieutenant Grass (Will Arnett) to find Hex and hire him to stop Turnbull. Jonah goes to a brothel and spends the night with Lilah (aka Tallulah Black) (Megan Fox), a prostitute attracted to the disfigured man for more than just professional reasons. As Jonah prepares to leave the next morning, Grass' men burst in and tell Jonah that Turnbull is still alive. They show him a captured thug from the train hijacking who told them Turnbull is headed northwest, before dying during interrogation. But Jonah briefly resurrects the man and learns that he has no knowledge of Turnbull's whereabouts; the best he can do is tell who recruited him, ex-Colonel Slocum (Tom Wopat), who is running an illegal deathmatch pavilion in South Carolina, to the southeast.
  With the help of a corrupt Washington aristocrat, Adleman Lusk (Wes Bentley), Turnbull tracks down and steals the remaining components of the weapon he is seeking. When Hex confronts Slocum in South Carolina, Slocum refuses to talk, sarcastically telling Hex to ask Turnbull's dead son, Jeb, where his father is. Jonah says that is a good idea, then overpowers Slocum's men and throws Slocum himself into the ring, to be killed by his own fighters. After setting fire to the ring, he frees a dog being tormented by Slocum's handlers, which starts to follow him around. In a cemetery in Gettysburg, Jonah digs up and resurrects Jeb Turnbull (an uncredited Jeffrey Dean Morgan). Jonah apologizes for killing Jeb, and says that his father has to be stopped before he murders more people. Jeb reveals that his father is at Fort Resurrection, and then returns to the afterlife.
  After entering the fort, Hex sees plans for the "superweapon" that Turnbull has stolen and assembled. In another part of the fort, Turnbull explains to Burke that the weapon was designed by Eli Whitney for the U.S. military, but they refrained from building it after realizing it was simply too powerful to ever consider using. Jonah confronts Turnbull, killing several of his men, but Turnbull escapes and Hex receives a near-fatal wounding from Burke, but is able to escape. He collapses in a field, hovering near death for several days. Turnbull, anticipating that Hex will return, sends Burke to bring him "something Hex loves." Burke kidnaps Lilah from the brothel. Turnbull test-fires the "superweapon" on a small town in Georgia, which is leveled to the ground, killing hundreds of civilians. When President Grant receives the news, his aide reports that they have no idea where in the country Turnbull will strike, and that they do not have enough military manpower to guard every centennial celebration. Hex is found by his Native American allies, who perform a ceremony that heals him. Back on his feet, he relays a message to Lt. Grass that Turnbull plans to attack Washington, D.C., then rides to Independence Harbor alone to stop him.
  When Jonah attempts to infiltrate the harbor where Turnbull's ironclad warship is anchored, Burke spots him and attacks him. Hex overpowers and kills him, then uses his powers to bring Burke back from the dead, just so Hex can incinerate his body completely. Jonah prepares to shoot Turnbull but Turnbull holds Lilah at gunpoint and forces Jonah to surrender. Turnbull chains Jonah and Lilah in the hold of his ship and tells Jonah that he wants him to watch as the Union is destroyed. The ship leaves harbor and steams toward Washington, D.C. A monitor commanded by Lt. Grass intercepts Turnbull, but is quickly destroyed with the weapon, which has been mounted on the bow.
  In the hold, Lilah picks her handcuffs and frees herself and Jonah. She holds off the guards with two pistols while Jonah rushes up to the deck to stop Turnbull. Turnbull gains the upper hand and orders the weapon to fire. The weapon blankets Washington with a volley of delay-action bomb shells, and Turnbull gives the order for the trigger shell to be launched. But Hex and Turnbull's fight takes them down into the engine room, where Hex throws his tomahawk into the weapon's belt feeder, trapping the trigger shell. He then brutally beats Turnbull and traps his neck in a gear, before saving Lilah. The pair jump into the water just as the trigger shell ignites in the engine room, killing Turnbull and all his men. The next day, President Grant rewards Jonah with a large sum of money, a full pardon, and offers him a job as Sheriff of the entire United States. Jonah declines, but assures the president that if they need him, they'll be able to find him. Lilah is waiting for him outside the White House, and they leave the city together.
  In the last scene, Jonah visits Jeb's grave to apologize for having to kill his father, then rides out of the cemetery with his dog.
question: On whose side did Jonah Hex fight during the American civil war ?
answer: Union