Two teenage gangs, the Jets (White) and the Sharks (Puerto Rican), struggle for control of the neighborhood, amidst police whistles and taunts (Prologue). They are warned by Lt. Schrank and Officer Krupke to stop fighting on their beat. The police chase the Sharks off, and then the Jets plan how they can assure their continued dominance of the street. The Jets' leader, Riff, suggests setting up a rumble with the Sharks. He plans to make the challenge to Bernardo, the Sharks' leader, that night at the neighborhood dance. Riff wants to convince his friend and former member of the Jets, Tony, to meet the Jets at the dance, but some of the Jets are unsure of his loyalty ("Jet Song"). Riff meets Tony while he's working at Doc's Drugstore to persuade him to come. Loyal to Riff, Tony agrees, but he wants no further part of gang life and imagines a better future ("Something's Coming").
Maria works in a bridal shop with Anita, the girlfriend of her brother, Bernardo. Maria has just arrived from Puerto Rico, and her family has selected Chino, a member of the Sharks, to be her future husband. Anita makes Maria a dress to wear to the neighborhood dance. The Shark girls extol the virtues of "America".
At the dance, after introductions, the teenagers begin to dance; soon a challenge dance is called ("Dance at the Gym"), during which Tony and Maria (who aren't taking part in the challenge dance) see each other across the room and are drawn to each other. They dance together, forgetting the tension in the room, fall in love, and try to kiss, but Bernardo pulls his sister from Tony and sends her home. Riff and Bernardo agree to meet for a War Council at Doc's, a drug store which is considered neutral ground, but meanwhile, an infatuated and happy Tony finds Maria's building and serenades her outside her bedroom ("Maria"). He appears on her fire escape, and the two profess their love for one another ("Balcony Scene"). Meanwhile, Anita, Rosalia, and the other Shark girls discuss the differences between the territory of Puerto Rico and the mainland United States of America, with Anita defending America, and a girl named Rosalia yearning for Puerto Rico, ("América"). The Jets get antsy while waiting for the Sharks inside Doc's Drug Store. Riff helps them let out their aggression ("Cool"). The Sharks arrive to discuss weapons to use in the rumble. Tony suggests "a fair fight" (fists only), which the leaders agree to, despite the other members' protests. Bernardo believes that he will fight Tony, but must settle for fighting Diesel, Riff's second-in-command, instead. This is followed by a monologue by the ineffective Lt. Schrank trying to find out the location of the rumble. Tony tells Doc about Maria. Doc is worried for them while Tony is convinced that nothing can go wrong; he is in love.
Maria is in a very happy mood at the bridal shop, as she anticipates seeing Tony again, ("I Feel Pretty"). Tony meets Maria at the bridal shop the next day, where they dream of their wedding ("One Hand, One Heart"). She asks Tony to stop the fight, which he agrees to do. Tony, Maria, Anita, Bernardo (and the Sharks), and Riff (and the Jets) all anticipate the events to come that night ("Tonight Quintet"). The gangs meet each other under the highway, and as the fight between Bernardo and Diesel is just beginning, Tony arrives and tries to stop the rumble. Though Bernardo taunts Tony, ridiculing his attempt to make peace and provoking him in every way, Tony keeps his composure. When Bernardo pushes Tony, Riff punches him in Tony's defense. The two draw their switchblades and get in a knife fight ("The Rumble"). Tony warns Riff to back away, but Riff shakes him off and continues the fight. In an important moment of the show, Riff has an opportunity to stab Bernardo, but Tony holds him back. After shaking off Tony, Riff returns to the fight but is accidentally stabbed and killed by Bernardo in the process. Tony then takes Riff's knife and kills Bernardo in a fit of rage. The two gangs then go into a free-for-all. The sound of approaching sirens is heard, and everyone scatters, except Tony, who stands in shock at what he has done. The tomboy Anybodys, who stubbornly wishes that she could become a Jet, tells Tony to flee from the scene at the last moment. Only the bodies of Riff and Bernardo remain.
Tony and Maria blissfully unaware of what has happened, Maria daydreams happily about seeing Tony with her friends—Rosalia, Consuelo, Teresita and Francisca ("I Feel Pretty"). Just then, Chino brings the news that Tony has killed Bernardo. Maria flees to her bedroom, praying that Chino is mistaken. Tony arrives to see Maria, she initially pounds on his chest with rage, but it is fake- she still loves him, and they plan to run away together; as the walls of Maria's bedroom disappear, they find themselves in a dreamlike world of peace ("Somewhere").
The dejected Jets are set on by Officer Krupke. A brawl ensues, and Officer Krupke is outnumbered and leaves. In an attempt to get their mind off the death of Riff, the Jets lampoon Officer Krupke, and the rest of the adults who try to understand them, ("Gee, Officer Krupke"). The Jets make Action leader of the gang. Just then, Anybodys, who has been spying on the Sharks in an attempt to ingratiate herself, brings news that she overheard Chino planning to hunt down Tony and kill him with a gun. Anybodys' persistence pays off- she is accepted into the gang, as when the Jets spread out to look for Tony, she is given a place to search. Not only has she gained acceptance, but she also begins a relationship with Action.
A grieving Anita arrives at Maria's apartment. As Tony leaves, he tells Maria to meet him at Doc's so they can run away to the country. In spite of her attempts to conceal it, Anita sees that Tony has been with Maria, and launches an angry tirade against him, ("A Boy Like That"). Maria responds counters by telling Anita how powerful love is, ("I Have a Love"), though, and Anita realizes that Maria loves Tony as much as she had loved Bernardo. She admits that Chino has a gun and is looking for Tony.
Lt. Schrank arrives to question Maria about her brother's death, and Anita agrees to go to Doc's to tell Tony to wait. Unfortunately, the Jets, including Anybodys, who has found Tony, have congregated at Doc's, and they taunt Anita with racist slurs and eventually attack her physically. Doc arrives and stops them. Anita is furious, and in anger, she spitefully delivers the wrong message, telling the Jets that Chino has shot Maria dead.
Doc relates the news to Tony, who has been dreaming of heading to the countryside to have children with Maria. Feeling there is no longer anything to live for, Tony leaves to find Chino, begging for him to die as well. Just as Tony sees Maria alive, Chino arrives and shoots Tony. The Jets, Sharks, and adults flock around the lovers. Maria holds Tony in her arms (and sings a quiet, brief reprise of "Somewhere") as he dies. Angry at the death of another friend, the Jets move towards the Sharks but Maria takes Chino's gun and tells everyone that "all of [them]" killed Tony and the others, and now she can kill, because now she hates, too. However, she is unable to bring herself to fire the gun and drops it, crying in grief. Gradually, all the members of both gangs assemble on either side of Tony's body, showing that the feud is over. The Jets and Sharks form a procession, and together they carry Tony away with Maria being the last one in the procession.