Title: Midnight Cowboy

Joe Buck, a young Texan working as a dishwasher, quits his job and heads to New York City to become a prostitute. Initially unsuccessful, he manages to bed a middle-aged New York woman in her posh apartment, but the encounter ends badly: he gives her money after she is insulted and throws a tantrum when he requests payment.

Joe meets Enrico Salvatore "Ratso" Rizzo, a con man with a limp who takes $20 from him by ostensibly introducing him to a pimp. After discovering that the man is actually an unhinged religious fanatic, Joe flees in pursuit of Ratso but cannot find him. Joe spends his days wandering the city and sitting in his hotel room. Soon broke, he is locked out of his hotel room and his belongings are impounded.

Joe tries to make money by receiving oral sex from a young man in a movie theater, but learns after the fact that the young man has no money. Joe threatens him and asks for his watch, but eventually lets him go unharmed. The next day, Joe spots Ratso and angrily shakes him down. Ratso offers to share the apartment in a condemned building where he is squatting. Joe reluctantly accepts his offer, and they begin a "business relationship" as hustlers. As they develop a bond, Ratso's health grows steadily worse.

In a flashback, Joe's grandmother raises him after his mother abandons him. He also has a tragic relationship with Annie, a mentally unstable girl. Ratso tells Joe his father was an illiterate Italian immigrant shoeshiner whose job led to a bad back and lung damage from long-term exposure to shoe polish. Ratso learned shoeshining from his father but considers it demeaning and generally refuses to do it (although he does shine Joe's cowboy boots to help him attract clients). Ratso harbors hopes of moving to Miami, shown in daydreams in which he and Joe frolic carefree on a beach and are surrounded by dozens of adoring middle-aged women.

An eccentric man and woman approach Joe in a diner and give him a flyer inviting him to a Warhol-esque party; Joe and Ratso attend, but Ratso's poor health and hygiene attract unwanted attention from several guests. Joe mistakes a joint for a cigarette and starts to hallucinate after taking several long puffs. He leaves the party with Shirley, a socialite who agrees to pay him $20 for spending the night, but Joe cannot perform sexually. They play Scribbage together and the resulting wordplay leads Shirley to suggest that Joe may be gay; suddenly he is able to perform. The next morning, she sets up her friend as Joe's next client and it appears that his career is finally taking off.

When Joe returns home, Ratso is bedridden and feverish. He refuses medical help and begs Joe to put him on a bus to Florida. Desperate, Joe picks up a man in an amusement arcade and robs him during a violent encounter in the man's hotel room where Joe brutally beats the man. Joe buys bus tickets with the money so he and Ratso can board a bus to Florida. During the trip, Ratso's health deteriorates further: he becomes incontinent and sweat-drenched.

At a rest stop, Joe buys new clothing for Ratso and himself and discards his cowboy outfit. On the bus, Joe muses that there must be easier ways to earn a living than hustling, and tells Ratso he plans to get a regular job in Florida. When Ratso fails to respond, Joe realizes that he has already died. The driver tells Joe there is nothing to do but continue to Miami and asks Joe to close Ratso's eyelids. Joe, with tears welling in his eyes, sits with his arm around his dead friend. 