The film is set in the rough neighborhood of Lincoln Square on the West Side of Manhattan during the summer of 1957. There is palpable tension in the air as two gangs vie for dominance of the area: the Jets, a white gang led by Riff, and the Sharks, a Puerto Rican gang led by Bernardo. Not too long after the opening scene, a scuffle between rival gang members occurs and police officers Lieutenant Schrank and Officer Krupke intervene to stop the brawl. Officer Krupke makes a public announcement ordering both gangs to stop all hostilities or risk arrest.
The rival gangs ignore the threat and the Jets plan to challenge the Sharks to a rumble that night at a dance social. Riff begins to gather his troops to ensure his gang’s victory and decides to tap every single Jet he can round up, including his best friend Tony, co-founder of the Jets.
Tony is very different from the hot-tempered Riff; he is mellow and hard-working, and is in “retirement” from gang activity, doing odd jobs for “Doc,” who runs the local pharmacy. Riff implores Tony to come to the dance social, but he isn’t interested. Tony tells Riff that he feels that something big is afoot and Riff eventually convinces Tony to make an appearance,
Meanwhile, Maria, Bernardo’s younger sister, can barely contain her anticipation for the dance that night. She dresses for it with her best friend, Anita, who also happens to be Bernardo’s girlfriend. At the dance, there is a thick tension in the air with very little mingling between the two gangs. When Tony arrives, he and Maria lock eyes from opposite ends of the dance hall and instantly fall in love. When Bernardo sees his sister dancing with Tony, he angrily intervenes and threatens Tony, telling him to stay away from her. Riff calls a war council at Doc's that night with the Sharks.
Unable to keep his mind clear of Maria, a smitten Tony braves the dangers of crossing over to the Sharks territory to see her. They meet on her fire escape and there affirm their love for each other. The rival gangs meet and both sides agree to a rumble later that night. Genuinely concerned for the well-being of the kids, Doc makes an impassioned plea for them to stop fighting, but no one pays him any heed.
Both parties agree to a one-on-one fistfight between the gang's respective best men to determine supremacy, at Tony’s suggestion. Schrank tries to sweet-talk the gang members into disclosing the time and location of the rumble, but nobody confesses.
Maria works at a dress shop, where she learns about the rumble from Anita. Tony arrives to visit Maria, surprising and frightening Anita. She quickly warns them of the consequences that their relationship would bring, especially if Bernardo were to learn of it. The couple remains steadfast, however, and manages to convince Anita of the sincerity of their love for one another. The lovers, relieved that they have pacified Anita, begin to imagine their future wedding ceremony. Maria urges Tony to make every effort to stop the rumble and he agrees.
The two gangs make their way to the agreed spot under the highway. Tony tries his best to prevent the fight, but Bernardo accosts him, provoking him to fight. Tony manages to keep his cool because of his love for Maria. Soon, however, Riff and Bernardo pull switchblades on one another. When Bernardo kills Riff, Tony is overcome with anger and kills Bernardo. Leaderless and confused, the gangs go at each other with a mad frenzy. The police arrive on the scene with sirens ablaze, quickly dispersing the combatants. A grief-stricken Tony is nearly arrested, but manages to get away.
Maria waits anxiously for Tony, when Chino arrives to give her the awful news of Bernardo’s death at the hands of her lover. Tony arrives to a grieving Maria. He repentantly explains the events to Maria and asks for her forgiveness, fully intending to surrender himself to the authorities. Maria’s love for Tony prevails and she asks Tony to stay with her that night. Meanwhile, the Jets reconvene outside a garage trying to plan their next steps. Ice, their new leader, wisely advises the rest of the gang to let the heat die down and not confront the Sharks so as not to bring the law on their heads. Shortly after this announcement a frantic Jets member named Anybodys bursts in with news that Chino, one of Bernardo’s closest friends, has a gun and has sworn to kill Tony when he finds him. Ice sends out the Jets to warn Tony of Chino’s threat.
When Maria and Tony awaken, Tony heads to Doc's store to get some money so they can run away to start a new life somewhere. Anita spots Tony in the alleyway outside Maria's window and scolds Maria for betraying the memory of Bernardo, but Maria talks her into helping them elope. Schrank arrives to question Maria about the recent deaths. Maria sends Anita to Doc's to tell Tony that she has been detained, but at the store, members of the Jets harass Anita. In her anger and dismay at having nearly been molested, Anita lies and tells Doc and the gang that Chino has killed Maria in a fit of rage. Doc sends the ruffians away and gives Tony Anita’s devastating false news. A distraught Tony then mindlessly runs out into the street, taunting Chino to kill him as well.
Tony spots Maria near a playground next to the pharmacy and the lovers rush to meet each other. In the moment right before they embrace, Chino shoots Tony, who dies in Maria's arms. Maria takes Chino's gun and threatens them with it, accusing all of them for the senseless deaths of Riff, Bernardo, and now Tony. The police and Doc arrive on the scene to survey the mess. The Sharks and the Jets finally put aside their difference and form a somber impromptu funeral procession with Maria trailing behind them.