The film opens in 1920 as Damien O'Donovan (Cillian Murphy), a young doctor, is about to leave Ireland to work in a London hospital. His brother Teddy (Pádraic Delaney) commands the local flying column of the Irish Republican Army. After a hurling match, Damien witnesses the fatal beating of his friend, Micheál Ó Súillebheán, by British Black and Tans. Damien rebuffs his friends' entreaties to stay in Ireland and fight for independence from Great Britain, saying that the IRA is too outnumbered to win. As he is leaving town, Damien witnesses British soldiers beating a railway guard for refusing to allow the troops to board, as well as the subsequent resistance of the train driver (Liam Cunningham). Damien decides to stay and joins Teddy's IRA brigade.
In retaliation for Micheál's murder, the brigade raids the local Royal Irish Constabulary barracks for guns, then uses them to assassinate four British Auxiliaries. In the aftermath, Anglo-Irish landowner Sir John Hamilton (Roger Allam) coerces one of his servants, IRA member Chris Reilly (John Crean), into informing. As a result, the entire brigade is taken prisoner. In their cell, Damien meets the train driver, Dan, a union organizer who shares Damien's socialist views. British officers interrogate Teddy, pulling out his fingernails when he refuses to name names. Later, Johnny Gogan (William Ruane), an Irish-Scots soldier in the British Army, helps all but three of the prisoners escape.
After the actions of Sir John and Chris are revealed to the IRA, both are taken hostage. Because Teddy is still recovering, Damien is temporarily placed in command. Because the three remaining IRA prisoners were executed, the brigade receives orders to execute Sir John and Chris. Despite the fact that Chris is a lifelong friend, Damien shoots both him and Sir John. Later, Damien tells his sweetheart, Cuman na mBan courier Sinéad Sullivan (Orla Fitzgerald), about the shame of facing Chris's mother.
After the IRA ambushes and defeats an armed convoy of the Auxiliary Division, another detachment of Auxiliaries loots and burns the farmhouse of Sinéad's family. Sinéad is held at gunpoint while her head is shaved. Later, as Damien comforts her, a messenger arrives with news of a formal ceasefire between Britain and the IRA. While the village celebrates, Damien and Sinéad steal away for a romantic interlude.
When the terms of the Anglo-Irish Treaty are announced, the IRA divides over whether or not to accept it, because it does not grant complete independence from Britain. Teddy and his allies argue that accepting the Treaty will bring peace now while further gains can be made later. Damien, Dan and their side oppose the Treaty, proposing to fight for full independence and a more equitable society. As the new Irish Free State replaces British occupation with Teddy and his friends patrolling in Irish Army uniforms, Damien and his Anti-Treaty comrades feel betrayed.
After the Irish Civil War breaks out, Damien and Dan's column takes up arms against the new Irish Army. Dan is killed and Damien is captured during a raid for arms on a Free State barracks commanded by Teddy. Sentenced to death, Damien is held in the same cell where the British had imprisoned them earlier. Teddy pleads with him to reveal where the IRA is hiding the stolen arms, offering him full amnesty and the vision of a happy family life with Sinéad, but Damien refuses, saying that he killed Chris for being an informer. Writing a goodbye letter to Sinéad, Damien declares his love for her, adding that he knows what he stands for and is not afraid. At dawn, Damien is marched before a firing squad. As both brothers fight back tears, Teddy gives the order, the squad fires, and Damien crumples to the ground. Teddy delivers Damien's letter to Sinéad. She tells Teddy she never wants to see him again and falls to her knees screaming for Damien.