The irony is that after twenty years one man is now a criminal and the other is a police officer; the exact police officer who is going to take him down and be the cause of his arrest.
It is also ironic that these men were "best chums" when they were twenty, but now they do not recognize each other. Jimmy, the police officer, says that when Bob lit his cigarette, he recognized him as the person in a wanted poster. He didn't recognize him in the poster as his best friend but recognized him FROM the poster as a criminal. Bob also does not recognize his "best chum". He befriends this man who identifies himself as Jimmy. He even comments that he doesn't remember Jimmy having that height. Still, he is willing to be persuaded that Jimmy grew a few inches after he turned twenty. It wasnt until he saw his nose, not his full face but his nose, that he realizes that this isn't his friend.
With irony meaning the contrast between what is expected and what actually happens, this contrast first involves the character 'Silky Bob,' who tells the patrolman who walks his beat that he is just waiting in the doorway of a darkened hardware store for his old friend with whom he is going to have a promised reunion of twenty years. For, ironically, he is, in fact, speaking to his old friend, who does not reveal his identity because he now is a policeman while his old friend is a wanted man.
It is also situationally ironic that in talking to the officer, 'Silky Bob' lights a cigar, an act which provides enough light for the patrolman to see his "little white scar near his right eyebrow" and recognize him as a man wanted in Chicago. For, he meant only to arrive at his twenty-year appointment to meet his friend, but, ironically, discovers that time has changed this friend from "a good man into a bad man."
If "Silky" Bob is wanted by the Chicago police he may have decided to move to another big city. The most obvious choice would be New York, because it was the biggest city in America and also because it would seem like a good place for a crook like Bob to operate. We gather from his smooth manner and his nickname of "Silky" that he is some kind of a confidence man. Bob seems supremely self-confident while he is talking to the uniformed cop whom he doesn't recognize as his old friend Jimmy Wells. Bob hasn't been in New York for twenty years. What is especially ironic about O. Henry's story is that in fleeing from the law in Chicago, Bob runs straight into the arms of the law in New York. He is literally walking arm in arm with a policeman when he learns that he is under arrest. He doesn't brag about his misdeeds to the uniformed cop because that would obviously be foolish, but once he thinks he has reunited with his old friend Jimmy he starts confiding about how he has made his fortune.
The two men started up the street, arm in arm. The man from the West, his egotism enlarged by success, was beginning to outline the history of his career. The other, submerged in his overcoat, listened with interest.
The title of the story, "After Twenty Years," can be taken to mean that people can change a lot with the passage of so much time; but it can also be taken to mean that people's sins will catch up with them if they persist in their unlawful behavior long enough. Bob was a big success in the West, and he was proud of his success. He didn't realize, however, that his very success as a criminal could work against him. He had become so notorious that the long arm of the law reached out for him in far-away New York. The fact that he was being arrested in New York on behalf of the Chicago authorities was another sign of his success, along with his diamond scarfpin and diamond-studded pocket-watch.