The film takes place in Sweden around the turn of the twentieth century. Fredrik Egerman is a middle-aged lawyer married to a 19-year-old beauty, Anne. Their two-year marriage is still unconsummated, due to Anne's reluctance. Fredrik has a son, Henrik, from his marriage to his late first wife. Henrik is in his early twenties and is studying to be a minister but is currently tormented by his love for his step-mother, who secretly loves him in return. Henrik is distracting himself from his urges by attempting an inconclusive affair with Fredrik's lusty young servant, Petra. Between his two marriages, Fredrik had an affair with a prominent stage actress, the beautiful Desiree Armfeldt, but she broke off the relationship. Desiree now has a young son named Fredrik, born shortly after her affair with Fredrik Egerman. Desiree is now having an affair with an army officer, Count Carl-Magnus Malcolm. The Count's wife, Charlotte, is an old friend of Anne Egerman. Fredrik goes to see Desiree one night to pour out his marital troubles to her and ask for her help. Fredrik falls into a puddle outside Desiree's house, and Desiree dresses him in the Count's nightshirt. The violently jealous Count shows up and orders Fredrik to leave. After Fredrik goes, the Count and Desiree argue and subsequently decide to part amicably. When the Count returns home, he tells Charlotte about the encounter and orders her to tell Anne Egerman about Fredrik's supposed infidelity. When Charlotte visits Anne, she confesses that she loves the Count despite everything and would do anything to be loved in return. To solve these woes, Desiree has her mother invite all the characters to her country house for Midsummer Night, the shortest night of the year, a traditional observance in Sweden, when many party-goers stay awake all night until dawn. Desiree and Charlotte become temporary allies. Henrik and Anne, unexpectedly finding themselves alone together in a bedroom, consummate their relationship and elope with the assistance of Petra and her new lover Frid, another servant. Charlotte then joins Fredrik in the garden pavilion. Learning his wife is with Fredrik, the Count bursts in and challenges Fredrik to a game of Russian roulette. Fredrik loses but the Count had loaded the revolver with soot so neither party was ever in danger. The Count reunites with his wife, his feelings for her renewed by his jealousy. Desiree comforts Fredrik and he asks her not to leave him. The dilemmas of the four pairs of lovers appear to be happily resolved in the course of a night, said by Frid to have smiled three smiles upon them all.