In 1926, as China is in the throes of warlordism and anarchy, Machinist's Mate 1st Class Jake Holman (McQueen) is transferred from the US Asiatic Fleet's flagship in Shanghai to the Yangtze River Patrol gunboat USS San Pablo, nicknamed the Sand Pebble by her crew. On the way, he meets Jameson, an idealistic missionary, and Shirley (Bergen), a young American woman who has just signed up for a teaching position in a missionary school.
San Pablo, it turns out, is a run-down rust bucket of a boat only used for patrolling backwaters, and currently assigned to flag-showing in Changsha. Onboard discipline is relaxed to the point of negligence: as Holman discovers, the crew have, with the captain's tacit permission, delegated all menial chores to a coolie labor gang. However, Holman makes a point of taking care of the steam engine himself, antagonizing both his crewmates and the coolies for whom doing the sailors' work is how they earn their living.
After an accident kills the coolie in charge of the engine's mechanical maintenance, Holman is ordered to train a new one, Po-han (played by Mako), and despite his initial prejudice at the perceived stupidity of the Chinese, gradually warms to him. Meanwhile, Frenchie (Attenborough), the only crewman who gets along with Holman, meets Maily, a young Chinese woman who works as a hostess in a local brothel. With Holman's help, he buys up her debt and takes her to a room he has rented out for her.
Worsening tensions between Westerners and Chinese nationalist activists result in Po-han getting lynched by an angry mob (incited by Chinese communists). Jameson and Shirley are reluctantly put under San Pablo's protection, and the latter develops romantic feelings for Holman. Frenchie marries Maily in a secret ceremony and, while the boat is stuck offshore from Changsha for the winter, sneaks away every night to be with her. One day, as Holman is allowed ashore to carry mail, he shows up at Maily's room, finding her pregnant and Frenchie dead from pneumonia. Nationalist soldiers burst in and, the next day, Holman finds himself accused of Maily's murder.
An angry mob demands that San Pablo turn Holman over to Chinese custody, leading to a tense stand-off and a near-mutiny from the crew, who want to give him up. The gunboat's captain stands his ground, though his crew's behavior leaves him near-suicidal. The next day, he receives radioed orders to sail downriver to the coast, but ignores them and instead decides to form a rescue mission to evacuate Jameson and Shirley to safety. San Pablo runs a Chinese blockade, and much of the crew dies in a violent boarding action. At the missionary compound, Jameson, who refuses to leave, is gunned down by Nationalist soldiers. After the Captain is killed, Holman decides to stay behind in order to cover Shirley's evacuation by his remaining crewmates. He is mortally wounded just as he was about to fall back too.
Contains examples of:
- Anti-Hero: Holman.
- Anyone Can Die
- Asian Hooker Stereotype: Frenchie and Maily. More generally, the sailors are fond of patronizing Chinese prostitutes and, as Holman explains to Shirley, "Most [American] China Sailors, they don't go back. They pull 20, 30 years, then they shack up with a Chinese girl and open a bar."
- The Atoner: Maily works as a hostess in order to pay back money she once stole from missionaries.
- BFG: Holman's M1918 Browning Automatic Rifle.
- Chinese Launderer: And barber, and cook, and mechanic, and...
- Cloud Cuckoo Lander: Jameson.
- Complaining About Rescues They Don't Like: Jameson does this twice. It gets him killed the second time.
- Downer Ending: Captain Collins takes San Pablo upriver to rescue the missionaries, losing lots of men in the process, only to find that they don't want to be rescued, and blame the American gunboat's incursion for provoking violence with the Nationalist Army. Jameson argues with the Captain until a platoon of Nationalist soldiers show up, and Jameson finds out the hard way that they are in a "shoot first" kind of mood. While the Sailors apparently are able to get Shirley to safety, Jameson, Captain Collins, and Holman are all killed in the gunfight.
- The Engineer: Holman.
- Gunboat Diplomacy: The historical context for the story, which provides literal examples.
- Idiot Ball: Whether Jameson is right or wrong about San Pablo provoking the Nationalists, it is immediately obvious that they don't give two shits whose side he thinks he's on.
- Interrupted Suicide: The captain after the attempted mutiny.
- The entire mission to rescue the missionaries can be viewed as an extension of his suicide attempt.
- Last Stand: The Captain tries to hold off the Chinese soldiers while Holman and the other sailors evacuate Shirley to the boat. When he gets killed, Holman sends the rest of the shore party to the boat and holds them off a little longer.
- Machine Empathy: Holman feels more comfortable around machines than around people. Given the way he affectionately speaks to the ship's steam engine, it almost qualifies as Cargo Ship.
- Mercy Kill: Holman shoots Po-han at the latter's request, to avoid him being tortured to death by a lynch mob. It's still very much a Shoot the Dog deed as far as he and everyone else is concerned.
- The Mutiny: Not carried through, but a close thing nonetheless.
- Professional Buttkisser: Ensign Bordelles to Captain Collins.
- Reassigned to Antarctica: Holman is transferred to a remote backwater because he tends to get on his superiors' wrong side.
- Ironically, Holman doesn't really mind at first because he doesn't have to deal with all the ceremonial military stuff that he feels distracts him from actually doing his job of keeping the ship running.
- The Revolution Will Not Be Civilized: In keeping with Cold War politics, the Nationalists are depicted as well-intentioned extremists with legitimate grievances who feel driven to violence. Less sympathetic are the Dirty Communists, who try to goad the San Pablo into attacking them and incite Po Han's death. Nobody comes off well the end, including the Americans.
- Sanity Slippage: Captain Collins, big time.
- Shoot the Shaggy Dog: "What the hell happened?"
- Suicidal Pacifist: Jameson.
- Sword and Gun: The boat's Captain in the battle at the river barricade. Though this, along with his dress whites, was actually regulation for any US Navy warship in combat in 1926.
- Title Drop: "Welcome aboard the Sand Pebble. That's what we call ourselves, the Sand Pebbles."
- Yellow Peril: Just look at the tagline on the poster.