In an unnamed small Polish town on 8 May 1945, the day Germany officially surrendered, Maciek (Zbigniew Cybulski) and Andrzej (Adam Pawlikowski) are former Home Army soldiers, now cursed soldiers who have been assigned to assassinate the communist Commissar Szczuka (Wacław Zastrzeżyński), but fail in their first attempt to ambush him, killing two civilian cement plant workers instead. They are given a second chance in the town's leading hotel and banquet hall, Monopol.
Meanwhile, a grand fête is being organized at the hall for a newly appointed minor minister (and current town mayor) by his assistant, Drewnowski (Bogumił Kobiela). Drewnowski is in fact a double agent, present at the first attempt to kill Szczuka. Maciek manages to sweet talk himself into a room with the desk clerk, who is also a fellow Warsaw native. They sadly reminisce about such things as the older section of town and the chestnut trees which were lost when the Germans destroyed most of the city in the aftermath of the Warsaw Uprising. While Maciek and Andrzej bide their time to strike Szczuka, Maciek becomes infatuated with the hotel's barmaid, Krystyna (Ewa Krzyżewska).
Szczuka has recently returned from abroad (he served during the Spanish Civil War like many communists in the 1930s, and also spent time in the Soviet Union while the Germans occupied Poland), and is attempting to locate his son Marek. Szczuka's wife had died in a German concentration camp, and Marek had been staying with an aunt. Szczuka did not approve of the aunt's right-wing political views, and had written to her telling her to send his son Marek to live with other people he knew, apparently people whose political views were closer to Szczuka's own, but the aunt continued to raise Marek, who adopted her right-wing views and joined the Home Army (serving under an officer that Andrzej will replace later in the film). Szczuka goes to visit the aunt, who lives in the same town, to find out where is son is, but she says that he is already a grown man at 17 and that she does not know. Later that evening, Szczuka learns from the local security official that Marek has been captured by the Red Army and is being held in detention.
Maciek's crush on Krystyna grows as the hour he must assassinate Szczuka nears, while Drewnowski becomes giddy at the thought at what his boss' promotion will do for his own career. Drinking with a cynical reporter until he is quite drunk, Drewnowski barges into the banquet dinner. In short order he sprays the guests with a fire extinguisher, pulls the tablecloth (and everything on it) to the floor and finds himself out of a job.
After sleeping with Krystyna, Maciek goes for a walk with her and ends up in a bombed-out church. He tells her that he is thinking about changing some things in his life, and mentions the possibility of going to technical school. She finds an inscription on the wall, a poem by Cyprian Norwid:So often, are you as a blazing torch with flames
of burning rags falling about you flaming,
you know not if flames bring freedom or death.
Consuming all that you must cherish
if ashes only will be left, and want Chaos and tempest
Or will the ashes hold the glory of a starlike diamond
The Morning Star of everlasting triumph.
Attempting to fix her broken heel, Maciek stumbles into a crypt where the bodies of the men he killed that morning are laid out awaiting burial. He escorts Krystyna back to the hotel, where she has to go back to work at the bar until it closes at 3:00 a.m., and then goes inside, where he runs into Andrzej. He tells Andrzej that he has fallen in love with Krystyna, and although he is not a coward, he cannot continue killing and hiding and wants to lead a normal life. Andrzej is not only his friend, but also his commanding officer in the Home Army, and reacts as such, suggesting that Maciek would be a deserter if he failed to carry out the order to kill Szczuka. Maciek is taken aback, but then decides he must carry out his orders. He begins to stalk Szczuka, and when Szczuka forgoes his car to walk to the detention area holding his son, Maciek takes advantage of the opportunity to shoot him. As Szczuka falls, fireworks celebrating the end of the war fill the sky.
The following morning, Maciek goes to the truck where Andrzej awaits. From concealment he watches as Drewnowski arrives thinking he will join them, but Andrzej is aware that Drewnowski is only doing it because he has no other choice. Andrzej throws him to the ground and drives off. When Drewnowski sees Maciek, he calls out to him. Maciek flees and runs into a patrol of Polish soldiers. He is shot and ends up dying in a trash heap.
Ashes and Diamonds is considered by film critics to be one of the great masterpieces of Polish cinema and arguably the finest film of Polish realist cinema. Richard Peña in the book 1001 Movies You Must See Before You Die considers the ending of the film to be one of the most powerful and often quoted endings in film history. The film was ranked #38 in Empire magazines "The 100 Best Films Of World Cinema" in 2010. Director Martin Scorsese has listed it as one of his favourite films of all time.