information:highlighting, structural:reformatting
From The Westerner to For Whom the Bell Tolls, 1940–1943

Cooper returned to the Western genre in William Wyler 's The Westerner (1940) with Walter Brennan and Doris Davenport, about a drifting cowboy who defends homesteaders against Roy Bean, a corrupt judge known as the "law west of the Pecos ". Screenwriter Niven Busch relied on Cooper's extensive knowledge of Western history while working on the script. The film received positive reviews and did well at the box office, with reviewers praising the performances of the two lead actors. That same year, Cooper appeared in his first all- Technicolor feature, Cecil B. DeMille's adventure film North West Mounted Police (1940). In the film, Cooper plays a Texas Ranger who pursues an outlaw into western Canada, where he joins forces with the Royal Canadian Mounted Police who are after the same man, a leader of the North-West Rebellion. While not as popular with critics as its predecessor, the film was another box-office success, the sixth-highest grossing film of 1940.

The early 1940s were Cooper's prime years as an actor. In a relatively short period, he appeared in five critically successful and popular films that produced some of his finest performances. When Frank Capra offered him the lead role in Meet John Doe before Robert Riskin even developed the script, Cooper accepted his friend's offer, saying, "It's okay, Frank, I don't need a script." In the film, Cooper plays Long John Willoughby, a down-and-out bush-league pitcher hired by a newspaper to pretend to be a man who promises to commit suicide on Christmas Eve to protest all the hypocrisy and corruption in the country. Considered by some critics to be Capra's best film at the time, Meet John Doe was received as a "national event" with Cooper appearing on the front cover of Time on March 3, 1941. In his review in the New York Herald Tribune, Howard Barnes called Cooper's performance a "splendid and utterly persuasive portrayal" and praised his "utterly realistic acting which comes through with such authority". Bosley Crowther, in The New York Times, wrote, "Gary Cooper, of course, is 'John Doe' to the life and in the whole – shy, bewildered, nonaggressive, but a veritable tiger when aroused."

That same year, Cooper made two films with director and good friend Howard Hawks. In the biographical film Sergeant York, Cooper portrays war hero Alvin C. York, one of the most decorated American soldiers in World War I. The film chronicles York's early backwoods days in Tennessee, his religious conversion and subsequent piety, his stand as a conscientious objector, and finally his heroic actions at the Battle of the Argonne Forest, which earned him the Medal of Honor. Initially, Cooper was nervous and uncertain about playing a living hero, so he traveled to Tennessee to visit York at his home, and the two quiet men established an immediate rapport and discovered they had much in common. Inspired by York's encouragement, Cooper delivered a performance that Howard Barnes of the New York Herald Tribune called "one of extraordinary conviction and versatility", and that Archer Winston of the New York Post called "one of his best". After the film's release, Cooper was awarded the Distinguished Citizenship Medal by the Veterans of Foreign Wars for his "powerful contribution to the promotion of patriotism and loyalty". York admired Cooper's performance and helped promote the film for Warner Bros. Sergeant York became the top-grossing film of the year and was nominated for 11 Academy Awards. Accepting his first Academy Award for Best Actor from his friend James Stewart, Cooper said, "It was Sergeant Alvin York who won this award. Shucks, I've been in the business 16 years and sometimes dreamed I might get one of these. That's all I can say... Funny when I was dreaming I always made a better speech."

Cooper concluded the year back at Goldwyn with Howard Hawks to make the romantic comedy Ball of Fire with Barbara Stanwyck. In the film, Cooper plays a shy linguistics professor who leads a team of seven scholars who are writing an encyclopedia. While researching slang, he meets Stanwyck's flirtatious burlesque stripper Sugarpuss O'Shea who blows the dust off their staid life of books. The screenplay by Charles Brackett and Billy Wilder provided Cooper the opportunity to exercise the full range of his light comedy skills. In his review for the New York Herald Tribune, Howard Barnes wrote that Cooper handled the role with "great skill and comic emphasis" and that his performance was "utterly delightful". Though small in scale, Ball of Fire was one of the top-grossing films of the year and Cooper's fourth consecutive picture to make the top 20.

Cooper's only film appearance in 1942 was also his last under his Goldwyn contract. In Sam Wood 's biographical film The Pride of the Yankees, Cooper portrays baseball star Lou Gehrig, who established a record with the New York Yankees for playing in 2,130 consecutive games. Cooper was reluctant to play the seven-time All-Star, who had died only the previous year from ALS (now commonly called "Lou Gehrig's disease"). Beyond the challenges of effectively portraying such a popular and nationally recognized figure, Cooper knew very little about baseball and was not left-handed like Gehrig.

After Gehrig's widow visited the actor and expressed her desire that he portray her husband, Cooper accepted the role that covered a 20-year span of Gehrig's life: his early love of baseball, his rise to greatness, his loving marriage, and his struggle with illness, culminating in his farewell speech at Yankee Stadium on July 4, 1939, before 62,000 fans. Cooper quickly learned the physical movements of a baseball player and developed a fluid, believable swing. The handedness issue was solved by reversing the print for certain batting scenes. The film was one of the year's top-10 pictures and received 11 Academy Award nominations, including Best Picture and Best Actor (Cooper's third).

Soon after the publication of Ernest Hemingway's novel For Whom the Bell Tolls, Paramount paid $150,000 for the film rights with the express intent of casting Cooper in the lead role of Robert Jordan, an American explosives expert who fights alongside the Republican loyalists during the Spanish Civil War. The original director, Cecil B. DeMille, was replaced by Sam Wood, who brought in Dudley Nichols for the screenplay. After the start of principal photography in the Sierra Nevada in late 1942, Ingrid Bergman was brought in to replace ballerina Vera Zorina as the female lead, a change supported by Cooper and Hemingway. The love scenes between Bergman and Cooper were "rapturous" and passionate. Howard Barnes in the New York Herald Tribune wrote that both actors performed with "the true stature and authority of stars". While the film distorted the novel's original political themes and meaning, For Whom the Bell Tolls was a critical and commercial success and received 10 Academy Award nominations, including Best Picture and Best Actor (Cooper's fourth).