As promenaders stroll through the spring sunshine of the Summer Garden in St. Petersburg, children accompanied by nurses, governesses and servants play at being soldiers. Two military officers, Chekalinsky and Sourin, are chatting about the previous night's card party and the odd behaviour of their fellow officer Hermann, who watches the playing obsessively but never joins in. Tomsky enters the scene in the company of Hermann himself. Tomsky has noticed Hermann's infatuation for a young beauty, who is none other than Liza the fiancée of Prince Yeletsky and the jealously guarded foster daughter of an old countess. Tomsky relates the story of the countess: the old lady is known as the “Queen of Spades”, because in her youth she was a famous beauty in Paris who learned the secret of cards from the diabolical Comte de Saint Germain, and won vast sums using three cards; she disclosed which three cards they were to her husband and her lover, but then an apparition warned her that if she revealed the secret of the cards a third time, she would die. Hermann listens to the story with conspicuous excitement as he realises that his yearning to identify the three cards is related to winning the girl he loves.
In Liza's room, her girlfriends are busy chatting, playing music and acting boisterous. One of them, Pauline, sings a romance. Only Liza is silent and gloomy. Left to herself, she daydreams about the unknown young man, Hermann, who then suddenly appears at her balcony door. The terrified girl tries to send the imploring young man away. The countess, who has already retired to bed, hears the din and summons her foster daughter to sternly order to go to sleep. Returning to her room, Liza is no longer able to resist Hermann's amorous advance.
A festive masquerade in a prominent Saint Petersburg salon. The officers Chekalinsky and Sourin are again gossiping about Hermann's strange condition. Liza acts markedly coldly toward her fiancé, Yeletsky, who makes a passionate profession of love to the girl. In desperate excitement, Hermann stares out from the throng of carefree guests; his companions tease him about the story of the mysterious cards. A few members of the company entertain the others with a pastoral play, in which the poor Daphnis (portrayed by Pauline) wins the love of the lovely shepherdess Chloë, while the rich and arrogant Plutus (played by Tomsky) loses out. Liza secretly gives Hermann the key to her room and whispers the way to the countess's suite. The horde of guests greet their arriving monarch, Catherine the Great.
Hermann hides in the countess's room in order to learn the secret of the cards from her. Arriving back from the ball, the countess dismisses her chambermaid. As she undresses, she reminisces about her lost youth, hums a French tune and dozes off. The sudden emergence of a stranger awakens her: after Hermann's pleading proves useless, he draws a pistol to try to get her to talk, but she dies from terror. The horrified Liza enters to find the despairing Hermann and the countess's dead body.
In his barracks room, Hermann is reading a letter from Liza. The girl wants to believe that the countess's death was an unintentional accident and that Hermann is innocent, and begs for him to journey away with her. The young man, however, can think of nothing but the cards. A great storm erupts, and strange sounds are heard. The countess's ghost appears in Hermann's room and reveals the three cards: three, seven, ace.
On a cold winter night, an anguished Liza is waiting for her beloved on the bank of the Neva. Hermann arrives, and for a fleeting moment displays his old love for the girl, but then is again overcome by his crazed fixation with cards and rushes off. In her despair, the girl casts herself into the cracking ice of the river.
Young Saint Petersburg aristocrats are gambling in a card parlour. Prince Yeletsky, with whom Liza had broken off their engagement, is drowning his sorrows in the game. Hermann arrives and surprises everyone by starting to play: he bets on the three and then on the seven, winning huge sums. On the third round, Chekalinsky isn't willing to continue, so Prince Yeletsky challenges Hermann. Instead of the expected ace, Hermann draws the queen of spades, and the old countess winks at him from the card. The young man breaks down in horror and shoots himself. Death restores his crazed mind, and he dies thinking only of Liza.