At the very end of The Portrait of Dorian Gray, as Dorian Gray lies dead on his floor, Oscar Wilde crafts a final moment of irony to close out the story:
When they entered, they found hanging upon the wall a splendid portrait of their master as they had last seen him, in all the wonder of his exquisite youth and beauty. Lying on the floor was a dead man, in evening dress, with a knife in his heart. He was withered, wrinkled, and loathsome of visage. It was not till they had examined the rings that they recognized who it was.
The nature of Dorian's death is a classic example of situational irony. In attempting to destroy the painting, Dorian inadvertently kills himself due to the nature of the pact he made when he desperately wished to stay young forever. The knife that he drove through the painting winds up in Dorian’s own heart, and the painting’s destruction reverses the years of unnatural youthfulness in an instant. The character’s inadvertent suicide at the hands of the very painting that kept him young is a final twist in the story, and certainly the opposite outcome from what Dorian himself would have expected. As a final blow to the character, all the “loathsome” qualities that had appeared in the portrait over the years are finally reflected on Dorian’s actual face.