O. Henry's short story "One Thousand Dollars" tells the tale of Bobby Gillian, a carefree man who one day learns that he has inherited a thousand dollars from his uncle—with one stipulation. He must provide an accounting of how he spent the money to the lawyers who are the executors of the will. Gillian complains that it is such an "awkward" amount and seeks out advice on how to spend it. In the past it seems, Gillian had spent money recklessly on women and gambling. When no one supplies him with a suitable way to dispose of the money, he decides to give it away to Miss Hayden, his uncle's ward, a woman he just happens to be in love with. Instead of admitting that he is giving her the money, he uses the excuse that the lawyers found an amendment to the will which left her a thousand dollars. He then professes his love for her, but all she can say is "I am sorry." He then writes out an accounting for the money writing,
"Paid by the black sheep, Robert Gillian, $1,000 on account of the eternal happiness, owed by Heaven to the best and dearest woman on earth."
Gillian then delivers the accounting to the lawyers who speak of a "codicil" to the will which reveals that if Gillian had actually spent the money in a "prudent, wise or unselfish" manner, instead of the way he "used money in the past," he would receive $50,000. If he had spent the money foolishly the money would go to Miss Hayden. After this is revealed, Gillian quickly takes up the envelope with the accounting and informs the lawyers that it doesn't matter because he lost the money gambling.
The ending is ironic for two reasons. Gillian had actually done what his uncle wanted, but ultimately sacrifices the money for Miss Hayden by not telling the lawyers how he used the money. It's also ironic that he would give all the money away to a woman who didn't even love him.
I think that there is a little bit of irony in the end of this story. Specifically, I think that the attitudes of Tolman and Sharp, the lawyers, toward Gillian are ironic. This is because they completely misunderstand what is going on.
Toland and Sharp think that Gillian is just some playboy wastrel who has frittered away his inheritance just the way that his uncle feared that he would. They think that he has not grown up and has not shown any sort of responsible attitude.
What is ironic is that he really has grown up. He has acted in a completely unselfish way by giving up his inheritance so Miriam Hayden can have a good life.
So the lawyers have a completely mistaken impression of what has happened and that is somewhat ironic.