The novel graphically describes the brutality of the civil war in Spain during this time. It is told primarily through the thoughts and experiences of the protagonist, Robert Jordan. It draws on Hemingway's own experiences in the Spanish Civil War as a reporter for the North American Newspaper Alliance.
Jordan is an American who had lived in Spain during the pre-war period, and fights as an irregular soldier for the Republic against Francisco Franco's fascist forces. An experienced dynamiter, he is ordered by a Russian general to travel behind enemy lines and destroy a bridge with the aid of a band of local anti-fascist guerrillas, in order to prevent enemy troops from responding to an upcoming offensive. On his mission, Jordan meets the rebel Anselmo who brings him to the hidden guerrilla camp and initially acts as an intermediary between Jordan and the other guerrilla fighters.
In the camp, Jordan encounters María, a young Spanish woman whose life had been shattered by her parents' execution and her rape at the hands of the Falangists (part of the fascist coalition) at the outbreak of the war. His strong sense of duty clashes with both the unwillingness of the guerrilla leader Pablo to commit to an operation that would endanger himself and his band, and Jordan's own new-found lust for life which arises from his love for María. Pablo's wife, Pilar, with the support of the other guerillas, displaces Pablo as the group leader and pledges the allegiance of the guerrillas to Jordan's mission. When another band of anti-fascist guerrillas, led by El Sordo, is surrounded and killed during a raid they conducted in support of Jordan's mission, Pablo steals the dynamite detonators and exploder, hoping to prevent the demolition and thereby avoid fascist reprisals. Although he disposes of the detonators and exploder by throwing them down a gorge into the river, Pablo regrets abandoning his comrades and returns to assist in the operation.
The enemy, apprised of the coming offensive, has prepared to ambush it in force and it seems unlikely that the blown bridge will do much to prevent a rout. Regardless of this, Jordan understands that he must still demolish the bridge unless he receives explicit orders not to. Lacking the detonation equipment stolen by Pablo, Jordan plans an alternative method to explode the dynamite by using hand grenades with wires attached so that their pins can be pulled from a distance. This improvised plan is considerably more dangerous because the men must be nearer to the explosion. While Pilar, Pablo, and other guerrilla members attack the posts at the two ends of the bridge, Jordan and Anselmo plant and detonate the dynamite, costing Anselmo his life when he is hit by a piece of shrapnel. While escaping, Jordan is maimed when a tank shoots his horse out from under him. Knowing that his wound is severe enough that he is highly unlikely to survive, and that he would slow the others down, he bids goodbye to María and ensures that she escapes to safety with the surviving guerrillas. He refuses an offer from Agustín to shoot him and lies in agony, hoping to kill an enemy officer and delay their pursuit of his comrades before dying. The narrative ends right before Jordan launches his ambush.