What happens is the opposite of what was expected, or of what someone planned, in a way that reveals something about the characters or about the world of the work.
In The Red and the Black
His pride did not want to leave anything to chance, nor to the inspiration of the moment. According to Fouqué's confidences and what little he had read about love in his Bible, he drew up a fairly detailed plan of campaign.
The "fairly detailed plan of campaign" was meant to give Julien control, but it produces the opposite: he grows clumsy, does not know how to answer Madame de Rênal, and the rehearsed kiss is almost caught.
Book I, Chapter 14: The English scissors, the narrator
Following the maxims he had set himself, he considered his three hundred and twenty-one classmates his enemies, the most dangerous of them all being Abbé Pirard. A few days later, Julien had to choose a confessor, and a list was presented to him. Ah, my God! What do they take me for?, he thought. Do they imagine I don't know where I am treading? He chose Abbé Pirard.
Book I, Chapter 26: The world, or what the rich man lacks, the narrator
After all, he thought, my novel is finished, and the merit is all mine.
Book II, Chapter 34: A man of wit, Julien Sorel (in thought)
Barely a lieutenant, by favor and for two days, he already calculated that to be commander-in-chief at thirty at the latest, as all the great generals did, one had to be more than a lieutenant at twenty-three.
Book II, Chapter 35: A storm, the narrator
Could we not spend two months together in a delightful way? Two months are many days. I shall never have been so happy.
Book II, Chapter 43, Julien Sorel
when he could have been so happy on our walks in the woods of Vergy, an impetuous ambition carried my soul into imaginary regions. [...] No, I would die without knowing happiness if you had not come to see me in this prison.
Book II, Chapter 45, Julien Sorel
Madame de Rênal kept her promise. She made no attempt on her own life; but three days later she died in the arms of her children.
Book II, Chapter 45, the narrator
Subscription
The explanation of each passage, in every device and in every work, comes with a subscription.