Midnight Cowboy is a 1969 American drama film based on the 1965 novel of the same name by James Leo Herlihy. The film was written by Waldo Salt, directed by John Schlesinger, and stars Jon Voight alongside Dustin Hoffman. Notable smaller roles are filled by Sylvia Miles, John McGiver, Brenda Vaccaro, Bob Balaban, Jennifer Salt and Barnard Hughes.
The film won three Academy Awards: Best Picture, Best Director and Best Adapted Screenplay. It was the first gay-related Best Picture winner.  In addition, it was the only X-rated film ever to win Best Picture, though its rating has since been changed to R. It has since been placed 36th on the American Film Institute's list of the 100 greatest American films of all time, and 43rd on its 2007 updated version.
As the film opens, Joe Buck (Jon Voight), a young Texan working as a dishwasher, dresses in new cowboy clothing, packs a suitcase and quits his job. He heads to New York City, hoping to succeed as a prostitute. Initially unsuccessful, he succeeds in bedding a well-to-do middle-aged New Yorker (Sylvia Miles), but Joe ends up giving her money after she ends up lashing out at him when he requests payment.
Joe then meets Enrico Salvatore "Ratso" Rizzo (Dustin Hoffman), a street con man with a limp who takes $20 from Joe by offering to introduce him to a known pimp (John McGiver). After discovering that the man is actually an unhinged religious fanatic, Joe flees the encounter in pursuit of Ratso. Joe spends his days wandering the city and sitting in his hotel room. Soon broke, he is locked out of his hotel room and most of his belongings are impounded. He tries to make money by agreeing to receive oral sex from a young man (Bob Balaban) in a movie theater. When Joe learns that the young man has no money, Joe threatens him and asks for his watch, but eventually lets him go. The following day, Joe spots Ratso and angrily shakes him down. Ratso offers to share the apartment in which he is squatting in a condemned building. Joe accepts reluctantly, and they begin a "business relationship" as hustlers. As they develop a bond, Ratso's health, which has never been good, grows steadily worse.
Joe's story is told through flashbacks. His grandmother raises him after his mother abandons him, and his grandmother shows him affection but spends time with men much the way Joe's mother did. He also has a tragic relationship with Annie, a local mentally unstable girl. Ratso's backstory comes through stories he tells Joe. His father was an illiterate Italian immigrant shoe-shiner, who worked in a subway station. He developed a bad back, and "coughed his lungs out from breathin' in that wax all day". Ratso learned shoe-shining from his father but won't stoop so low as to do it. He dreams of moving one day to Miami.
An unusual couple approach Joe and Ratso in a diner and hand Joe a flyer, inviting him to a party. They enter a Warhol-esque party scene (with Warhol superstars in cameos). Joe smokes a joint, thinking it's a normal cigarette and, after taking a pill someone offered, begins to hallucinate. He leaves the party with a socialite (Brenda Vaccaro), who agrees to pay $20 for spending the night with him, but Joe cannot perform. They play scribbage together and Joe shows his limited academic prowess. She teasingly suggests that Joe may be gay and he is suddenly able to perform.
In the morning, the socialite sets up her friend as Joe's next customer and it appears that his career is on its way. When Joe returns home, Ratso is bedridden and feverish. Ratso refuses medical help and begs Joe to put him on a bus to Florida. Desperate, Joe picks up a man in an amusement arcade (Barnard Hughes), and when things go wrong, robs the man when he tries to pay with a religious medallion instead of cash. With the stolen money, Joe buys bus tickets. On the journey, Ratso's frail physical condition further deteriorates. At a rest stop, Joe buys new clothing for Ratso and himself, discarding his cowboy outfit. As they near Miami, Joe talks of getting a regular job, only to realize Ratso has died. The driver tells Joe there is nothing else to do but continue on to Miami. The film closes with Joe, tears welling in his eyes as he sits with his arm around his dead friend.
- Jon Voight as Joe Buck
- Dustin Hoffman as Enrico Salvatore "Ratso" Rizzo
- Sylvia Miles as Cass
- John McGiver as Mr. O'Daniel
- Brenda Vaccaro as Shirley
- Barnard Hughes as Towny
- Ruth White as Sally Buck
- Jennifer Salt as Annie
- Gilman Rankin as Woodsy Niles
- Georgann Johnson as Rich Lady
- Anthony Holland as TV Bishop
- Bob Balaban as Young Student
- Paul Benjamin as Bartender
- Tina Scala as Laundromat Lady
- The Party:
- Randall Carver as Rapist in Flashback (uncredited)
- Sandy Duncan as Woman in TV Montage (uncredited)
- M. Emmet Walsh as Bus Passenger (uncredited)
The opening scenes were filmed in Big Spring, Texas. A roadside billboard, stating "IF YOU DON'T HAVE AN OIL WELL...GET ONE!" was shown as the New York-bound bus carrying Joe Buck rolled through Texas.  Such advertisements, common in the Southwestern United States in the late-1960s and through the 1970s, promoted Eddie Chiles's Western Company of North America.  In the film, Joe stays at the Hotel Claridge, at the southeast corner of Broadway and West 44th Street in Midtown Manhattan. His room overlooked the northern half of Times Square.  The building, designed by D. H. Burnham & Company and opened in 1911, was demolished in 1972.  A motif featured three times throughout the New York scenes was the sign at the top of the facade of the Mutual of New York (MONY) Building at 1740 Broadway.  It was extended into the Scribbage scene with Shirley the socialite, when Joe's incorrect spelling of the word "money" matched that of the signage. 
Despite his portrayal of Joe Buck, a character hopelessly out of his element in New York, Jon Voight is a native New Yorker, hailing from Yonkers.  Dustin Hoffman, who played a grizzled veteran of New York's streets, is from Los Angeles.  Voight was paid "scale", or the Screen Actors Guild minimum wage, for his portrayal of Joe Buck, a concession he willingly made to obtain the part. 
The line "I'm walkin' here!", which reached No. 27 on AFI's 100 Years...100 Movie Quotes, is often said to have been improvised, but producer Jerome Hellman disputes this account on the 2-disc DVD set of Midnight Cowboy. However, Hoffman explained it differently on an installment of Bravo's Inside the Actors Studio. He stated that there were many takes to hit the traffic light just right so that they wouldn't have to pause while walking. In that take, the timing was perfect, but a cab came out of nowhere and nearly hit them. Hoffman wanted to say, "We're filming a movie here!", but decided not to ruin the take. 
Upon initial review by the Motion Picture Association of America, Midnight Cowboy received a "Restricted" ("R") rating. However, after consulting with a psychologist, executives at United Artists were told to accept an "X" rating, due to the "homosexual frame of reference" and its "possible influence upon youngsters". The film was released with an X. The MPAA later broadened the requirements for the "R" rating to allow more content and raised the age restriction from sixteen to seventeen. The film was later rated "R" for a reissue in 1971. The film retains its R rating.
The film earned $11 million in rentals at the North American box office.
Critical response to the film has been largely positive; Gene Siskel of the Chicago Tribune said of the film: "I cannot recall a more marvelous pair of acting performances in any one film."  Owen Gleiberman of Entertainment Weekly wrote: "Midnight Cowboy's peep-show vision of Manhattan lowlife may no longer be shocking, but what is shocking, in 1994, is to see a major studio film linger this lovingly on characters who have nothing to offer the audience but their own lost souls." 
Midnight Cowboy currently holds a 90% "Certified Fresh" rating on online review aggregator Rotten Tomatoes, with an average rating of 8.2/10, based on 60 reviews. The critics consensus states: "John Schlesinger's gritty, unrelentingly bleak look at the seedy underbelly of urban American life is undeniably disturbing, but Dustin Hoffman and Jon Voight's performances make it difficult to turn away." 
- Best Picture (Jerome Hellman) — Won
- Best Director (John Schlesinger) — Won
- Best Actor (Dustin Hoffman) — Nominated
- Best Actor (Jon Voight) — Nominated
- Best Supporting Actress (Sylvia Miles) — Nominated
- Best Adapted Screenplay (Waldo Salt) — Won
- Best Film Editing (Hugh A. Robertson) — Nominated
- Best Motion Picture — Drama (Jerome Hellman) — Nominated
- Best Director (John Schlesinger) — Nominated
- Best Actor — Motion Picture Drama (Dustin Hoffman) — Nominated
- Best Actor — Motion Picture Drama (Jon Voight) — Nominated
- Best Supporting Actress — Motion Picture Drama (Brenda Vaccaro) — Nominated
- New Star of the Year — Actor (Jon Voight) — Won
- Best Screenplay (Waldo Salt) — Nominated
- Best Film (Jerome Hellman) — Won
- Best Direction (John Schlesinger) — Won
- Best Actor in a Leading Role (Dustin Hoffman) — Won
- Most Promising Newcomer to Leading Film Roles (Jon Voight) — Won
- Best Screenplay (Waldo Salt) — Won
- Best Editing (Hugh A. Robertson) — Won
- Golden Bear (John Schlesinger) — Nominated
- Top Ten Films — Won
Midnight Cowboy also won the Directors Guild of America Award for Outstanding Directing – Feature Film and the Writers Guild of America Award for Best Adapted Screenplay.
John Barry, who supervised the music and composed the score, won a Grammy for Best Instrumental Theme.  Fred Neil's song " Everybody's Talkin' " won a Grammy Award for Best Male Pop Vocal Performance for Harry Nilsson. Schlesinger chose the song as its theme, and the song underscores the first act. Other songs considered for the theme included Nilsson's own "I Guess the Lord Must Be in New York City" and Randy Newman's "Cowboy". Bob Dylan wrote " Lay Lady Lay " to serve as the theme song, but did not finish it in time.  The movie's main theme, "Midnight Cowboy", featured harmonica by Toots Thielemans, but on its album version it was played by Tommy Reilly.  The soundtrack album was released by United Artists Records in 1969. . The title music from Midnight Cowboy and some of the incidental ques were included on the high profile political satirical feature documentary ToryBoy The Movie by John Walsh.
- John Barry's version, used on the soundtrack, charted at #116 in 1969.
- Johnny Mathis's rendition, the only one containing lyrics, reached #20 on the U.S. Adult Contemporary chart in the fall of 1969.
- Ferrante & Teicher's version, by far the most successful, reached #10 on the U.S. Billboard Hot 100 and #2 Adult Contemporary in the winter of 1970.
- Nilsson — "Everybody's Talkin'" (Fred Neil) 2:30 Arranged and conducted by George Tipton
- John Barry — "Joe Buck Rides Again" 3:46
- The Groop — "A Famous Myth" 3:22 Arranged and conducted by Garry Sherman
- John Barry — "Fun City" 3:52
- Leslie Miller — "He Quit Me" (Warren Zevon) 2:46 Arranged and conducted by Garry Sherman
- Elephant's Memory — "Jungle Gym at the Zoo" 2:15 Producer — Wes Farrell
- John Barry — "Midnight Cowboy" 2:34
- Elephant's Memory — "Old Man Willow" 7:03 Producer — Wes Farrell
- John Barry — "Florida Fantasy" 2:08
- The Groop — "Tears and Joys" 2:09 Arranged and conducted by Garry Sherman
- John Barry — "Science Fiction" 1:57
- Nilsson — "Everybody's Talkin'" (Fred Neil) 1:54 Arranged and conducted by George Tipton