De Vriess thinks Keith has attempted to duck duty aboard the Caine by using family influence, and rides him hard. But DeVriess is soon replaced by Lieutenant Commander Phillip Francis Queeg (Humphrey Bogart), a no-nonsense veteran officer, who has seen years of continuous duty. He quickly attempts to re-instill discipline into the crew, warning, "[T]here are four ways of doing things: the right way, the wrong way, the Navy way, and my way. If they do things my way, we'll get along." The next day, the Caine is assigned to tow a target for gunnery practice. Afterwards, Queeg berates both Keith and Keefer over a crewman's appearance and, while distracted, cuts off the helmsman's warning; as a result, the Caine runs over and cuts the towline to the target. Queeg refuses to accept responsibility for the accident and tries to cover it up. Other incidents serve to undermine Queeg's authority. When a quart of strawberries is stolen from the officers' mess, the captain goes to absurd lengths to try to find the culprit. More seriously, in combat, Queeg breaks off escorting a group of landing craft during an amphibious assault long before they reach the fiercely-defended shore, dropping a yellow marker in the water instead and leaving them unsupported. Afterwards, Queeg makes a speech to his officers, not explicitly apologizing for his behavior, but bending enough to ask for their support. His disgruntled subordinates do not respond.
Keefer begins trying to convince Maryk that he should relieve Queeg on the basis of mental illness. Matters come to a head during a violent typhoon. Maryk urgently recommends that they steer into the waves and take on ballast, but Queeg fears that the ballast will foul the fuel lines with salt water. Queeg's decisions seem to Maryk to threaten the capsizing of the Caine. When Queeg appears to become paralyzed and unable to deal with the crisis, Maryk relieves him and takes over, with Keith's support.
When they return to port, Maryk and Keith face a court-martial for mutiny. After questioning them and Keefer, Lieutenant Barney Greenwald (Jose Ferrer) reluctantly accepts the job of defense counsel, which a number of other lawyers have already turned down. The proceedings do not go well, as the self-serving Keefer has carefully managed to cover himself and denies any complicity. It was he who encouraged Maryk to question Queeg's sanity, playing amateur psychiatrist, and Greenwald has warned him in private that, under naval law, Keefer could, on these grounds, be held as responsible as Maryk.
A Navy psychiatrist testifies that Queeg does not have a mental illness, which the prosecution feels is enough to justify a conviction. But when Queeg is called to testify he snaps under Greenwald's tough cross-examination and gives blatantly paranoid testimony. Maryk is acquitted, and Keith is spared any charges.
After the acquittal, Maryk and his supporters celebrate at a hotel. Keefer joins them, not having the guts not to attend, although he lied in his testimony to protect himself. He thanks Maryk for not revealing this to the other officers. Maryk announces that it is "Over and done with", but at that moment a drunken Greenwald shows up, and, claiming a "guilty conscience", proceeds to deliver a few truths as to what really happened.
Greenwald attacks the officers of the Caine for not appreciating the years of danger and hardship endured by Queeg, a career naval man, whereas the rest of them have only joined up due to the war. He then lambasts Maryk, Keith and finally Keefer for not supporting their captain when he most needed it, and gets Maryk and Keith to admit that if they had given Queeg the support he had asked for, he might not have frozen during the typhoon.
Greenwald then turns to the man who, in his opinion, should really have been on trial: Keefer. He denounces him as the real "author" of the Caine mutiny, who "hated the Navy" and manipulated the others while keeping his own hands officially clean. Maryk tells Greenwald to "forget it", but instead the lawyer exposes Keefer's double-cross in court and throws a glassful of wine into his face. He then invites him to meet outside if he wants to do anything about it: "I'm a lot drunker than you are, so it'll be a fair fight". The other officers also depart, leaving Keefer alone in the room.
A few days later, Keith reports to his new ship and is surprised to find himself once again serving under Commander DeVriess. However, his new commanding officer lets Keith know that he will start with a clean slate.
Location shooting took place at Naval Station Treasure Island in San Francisco, Pearl Harbor, on the island of Oahu in Hawaii, and at Yosemite National Park in California, the scene of Keith's romantic interlude with May Wynn while on leave.
Lee Marvin was cast as one of the sailors not only for his acting ability, but because of his knowledge of ships at sea. Marvin had served in the U.S. Marines from the beginning of American involvement in World War II through the Battle of Saipan, in which he was wounded. Marvin became an unofficial technical adviser for the film.
Wouk's novel goes into much greater detail about Ensign Keith's experiences in midshipman school and in his early relationship with his girlfriend May Wynn. After the court-martial, he returns to the Caine and develops into a mature, competent Naval officer, something that is only hinted at in the film.
The Caine was played by the Navy destroyer minesweeper USS Thompson (DMS-38). This ship was not a 4-stack World War I-era ship, nicknamed a "four-piper," like the vessel in the novel because at the time the film was made, all such vessels had been scrapped. The Jones, the ship the Caine raced back to port early in the film, was portrayed by the minesweeper USS Surfbird (AM-383). Admiral Halsey's unnamed flagship was portrayed by the USS Kearsarge (CV-33), a post-war aircraft carrier launched in 1946; a number of World War II-era fighter planes were placed atop the flight deck for the filming.
He went on to direct Raintree County with Montgomery Clift and Elizabeth Taylor; The Young Lions with Clift, Marlon Brando and Dean Martin; a remake of the Marlene Dietrich classic The Blue Angel, and the film version of Harold Robbins's The Carpetbaggers, among others.
Dymytrk felt The Caine Mutiny could have been better than it was. He thought the movie should have been three and a half to four hours long to fully flesh out the characters and tell the story completely, but Columbia's Harry Cohn insisted on a two-hour limit.
The lyrics of the derisive song "Yellowstain Blues", which mocked Queeg's perceived cowardice during the landing incident, were written by Herman Wouk.
Dmytryk was also nominated for a Directors Guild Award for Outstanding Directorial Achievement in Motion Pictures.
Lt. Steve Maryk (Van Johnson): What're you, Barney, kind of tight?
Greenwald: Sure, I've got a guilty conscience. I defended you, Steve, because I found the wrong man was on trial. So, I torpedoed Queeg for you. I had to torpedo him ... and I feel sick about it.
Maryk: Ok, Barney, take it easy.
Greenwald: You know something? While I was studying law, and Mr. Keefer here was writing his stories, and you Willie were tearing up the playing fields of dear old Princeton, who was standing guard over this fat, dumb, happy country of our, eh? Not us, oh no, we knew you couldn't make any money in the service. So who did the dirty work for us? Queeg did, and a lot of other guys. Tough, sharp guys who didn't crack up like Queeg.
Ensign Willie Keith (Robert Francis): But no matter what, Captain Queeg endangered the ship, and the lives of the men.
Greenwald: He didn't endanger anybody's life, you did, all of you. You're a fine bunch of officers.
Lt. (j.g.) H. Paynter Jr. (Arthur Franz): You said yourself, he cracked.
Greenwald: I'm glad you brought that up, Mr. Paynter, cause that's a very pretty point. You know, I left out one detail in the court martial, wouldn't have helped our case any. Tell me, Steve, after the "Yellow Stain" business, Queeg came to you guys for help and you turned him down, didn't you?
Maryk: Yes, we did.
Greenwald: You didn't approve his conduct as an officer, he wasn't worthy of your loyalty, so you turned on him, you ragged him, you made up songs about him.. If you'd given Queeg the loyalty he needed d'ya suppose the whole issue would have come up in the typhoon? You're an honest man, Steve, I'm asking you. Do you think it would've been necessary for you to take over?
Maryk: It probably wouldn't've been necessary.
Keith: If that's true, then we were guilty.
Greenwald: Yeh, you're learning, Willie. You're learning that you don't work with a captain because you like the way he parts his hair, you work with him because he's got the job or you're no good. Well, the case is over, you're all safe. It was like shooting fish in a barrel. (Slight pause) And now we come to the man who should've stood trial. The Caine's favorite author. The Shakespeare whose testimony nearly sunk us all. Tell 'em, Keefer.
Lt. Tom Keefer (Fred MacMurray): No, you go ahead. You're telling it better.
Greenwald: You ought to read his testimony. He never even heard of Captain Queeg!
Maryk: Let's forget it, Barney.
Greenwald: Queeg was sick, he couldn't help himself. But you, you're real healthy. Only you didn't have one-tenth the guts that he had.
Keefer: Except I never fooled myself, Mr. Greenwald.
Greenwald: I wanna drink a toast to you, Mr. Keefer. From the beginning you hated the Navy. And then you thought up this whole idea, and you managed to keep your skirts nice and starched and clean, even in the court martial. Steve Maryk will always be remembered as a mutineer. But you, you'll publish your novel, you'll make a million bucks, you'll marry a big movie star, and for the rest of your life you'll live with your conscience, if you have any. Here's to the real author of the Caine mutiny. Here's to you, Mr. Keefer. (He throws his champagne in Keefer's face) If you wanna do anything about it, I'll be outside. I'm a lot drunker than you are - so it'll be a fair fight.