In the last part of Catch-22, Yossarian is arrested for wandering Rome without a pass. He's already been troublesome for his superiors, refusing to fly missions after Nately's death. Colonel Cathcart and Colonel Korn offer Yossarian an ultimatum: he can be court-martialed, or he can return home with an honorable discharge. They claim he will be hailed as a hero. This is a tempting offer for Yossarian, who has been nothing less than tormented by the violence of the war and the endless lunacy of having to fly more and more missions.
In spite of Yossarian's desire to go home, there is a catch to this offer. His superior officers demand that if he chooses the honorable discharge, he must vocally support them and their policies, which includes their demand that the men fly eighty missions. The missions are pointless and only lead to further pointless deaths. Yossarian cannot condemn other men to Nately's fate, so he rejects the offer. However, he is not willing to be court-martialed unjustly either.
Inspired by Orr's successful escape to Sweden, Yossarian ends up deserting the army to reach the same destination, just barely avoiding another assassination attempt from Nately's whore as he makes his way out.