It follows the story of Amy Jolly (Dietrich), a beautiful cabaret singer, who comes to Morocco looking for a new life. She meets Tom Brown (Cooper), a private of the French Foreign Legion, who has, just like her, enlisted to forget his past. They start to fall in love, but she is also courted by a rich bon vivant La Bessière (Menjou).
Tom Brown used to have a love affair with his superior adjudant Caesar's wife. He breaks up with her, and she revenges by hiring a couple of thugs to murder him. He ends up defeating them, but Caesar, already knowing about the adultery, orders Tom to leave the city with his regiment. Tom suspects that Caesar is planning to kill him, and considers deserting and running away with Amy, but, after all, decides she would be happier with a rich man and leaves Morocco. Their regiment runs into a machine gun nest. Caesar orders Tom to take on it alone, but then joins him, turning it from a Uriah Gambit into a kind of duel by proxy. Tom survives, but Caesar is killed.
Furious with Tom leaving her, Amy accepts La Bessière's proposal. However, during their engagement party, Tom's regiment returns without him. A soldier tells Amy that Tom was wounded and they left him in a hospital in Amalfa. La Bessière takes Amy there by his car, telling the guests that he loves her and wants her to be happy. She finds out that Tom is alive and well, and is departing the next morning. Seeing a group of women who follow the Legion for the soldiers they love, Amy joins them and walks into the desert.
In 1992, the film was selected for preservation in the National Film Registry.
Morocco provides examples of the following tropes:
- Assassin Outclassin': Tom easily deals with the thugs Caesar's wife sent after him.
- Big Damn Kiss: Notably averted. Amy sacrifices all she has to follow her love, but whether it turns out well is left for the viewers to guess.
- Blackface (and Yellowface): Dolls in Amy's room look really racist today.
- Brick Joke: Tom Borrows 20 franks from his fellow soldier to buy an apple from Amy after her performance. Much later, when Caesar orders Tom to deal with the machine gun, that soldier demands his money back.
- Chick Magnet: Tom.
- Fanservice: In-universe, an iconic scene of Amy's first performance. She appears dressed in a tailcoat and a top hat, and after the song she kisses a woman from the audience on the lips, to the woman's embarrassment and the audience's applause.
- Femme Fatale: Played with. Amy looks and acts like one, but ultimately sacrifices all she has for love. On the other hand, things would look different from La Bessière's point of view.
- Foreshadowing: In the middle of the film Amy sees the women who follow the legionnaires and call them mad. In the end she joins them.
- Fourth Date Marriage: It takes very little for Amy to both fall in love with Tom and accept La Bessière's proposal.
- Girl-on-Girl Is Hot: And you thought this was a recent trope! Note the rapturous applause when Amy kisses a female audience member on the lips.
- Gold Digger: Discussed and ultimately defied. The cabaret owner advices Amy to find herself a "protector", but La Bessière offers her a proper marriage, and she ultimately follows Tom.
- Happily Ever After: Averted. Amy and Tom love each other, but in the final scene they're not even on the screen together. Happy ending is implied, but not shown on screen.
- Hollywood Darkness: When Tom accompanies Any home at night, he hides from her in a door opening, where there's supposed to be shadow. He is highly visible on the screen, but Amy walks right past him.
- I Want My Beloved to Be Happy: Both Tom and La Bessière do it at some time, believing Amy would be happier with the other man.
- Jade-Colored Glasses: While Tom visits Amy for the first time, they both admit being this, almost bragging who's more jaded and cynical.
- Love at First Sight: Amy invites Tom to her house before they even exchange a word. After they talk once, they are in love.
- Mysterious Past: Both Tom and Amy have a Dark and Troubled Past they don't want to talk about. Something bad enough to join the Foreign Legion or become a cabaret singer in Morocco.
- No Antagonist: Caesar somewhat opposes Tom, but the main conflict is resolved entirely by Tom and Amy making decisions with no opposition.
- Rich Suitor, Poor Suitor: Naturally, the poor suitor wins. Note that the rich suitor is shown as a wholesome man, even willing to help his beloved to be with the man she loves.
- Sex Sells: In this case, sex sells apples in the cabaret.
- Talk About the Weather: Guests at the engagement party, when Amy runs away to ask the soldiers about Tom.
- The Uriah Gambit: Played with, as described above.
- Tempting Apple: Before starting selling apples, Amy sings a highly suggestive song "What am I bid for my apple".
- Travel Montage: La Bessière and Amy's travel from Morocco to Amalfa is shown by camera tracking they path on a map.
- Triang Relations: Type 4. Tom and La Bessière both love Amy, but she only shows affection towards Tom.
- Woman Scorned: Adjudant Caesar's wife, sending killers after Tom when he dumps her.
- Your Cheating Heart: Tom and adjudant Caesar's wife.