In the opening scene, Captain James T. Kirk (Chris Pine) is meeting with the Teenaxi people to make a treaty between them and their enemies, the Fenopians. Kirk is holding an artifact that he claims is a gift of peace from the Fenopians, but the Teenaxi leader (Shea Wigham) considers it a threat. He rolls down to confront Kirk, where we see that the leader and the rest of his people are small creatures. Still, they gang up on Kirk and attack him. Kirk calls for Scotty (Simon Pegg) to beam him back up to the Starship Enterprise.
Kirk records a log, stating that they are now about three years into their five-year mission to explore the ends of the universe. Kirk has become rather bored by this point, and he wonders what else there is to see out there.
Kirk is joined by Bones McCoy (Karl Urban) with a bottle of scotch that he took out of Chekhov's (Anton Yelchin) locker. Bones notes that Kirk's birthday is coming up, which Kirk isn't looking forward to since it reminds him of how his dad died on the same day, and how Kirk will be a year older than his dad when he died. Bones states that Kirk has spent all this time figuring out who his dad was in his life, and now he's wondering what it means to be Kirk himself.
The crew descends onto Starbase Yorktown to replenish their supplies. Spock (Zachary Quinto) and Uhura (Zoe Saldana) appear to be going through a rough patch in their relationship. She is ready to hand him back a necklace that he gave her, but he refuses to take it back. Mr. Sulu (John Cho) reunites with his life partner and their daughter. Spock is then called aside by two elder Vulcans. He is informed that his older self, Ambassador Spock Prime, has just died.
Kirk meets with Commodore Paris (Shoreh Aghdashloo) to apply for a position as Vice Admiral. He requests that Spock be made captain of the Enterprise in his place.
A distress signal is picked up by the Federation from an alien named Kalara (Lydia Wilson), who claims to have been part of a crew whose ship suffered a critical malfunction. She asks for help in rescuing her crew on the far side of the nebula.
The Enterprise sets off on the rescue mission. As they approach a Class M planet, they are suddenly attacked by a massive cluster of ships. The aliens riding the ships invade the Enterprise. The crew tries fighting back, but their weapons aren't strong enough, and when Sulu tries to warp them out of there, they see that the ship's thrusters have been broken off by the enemy. The aliens then allow their leader, Krall (Idris Elba), to enter. His soldiers find the artifact that Kirk possessed earlier, which happens to be a bio-weapon called the Abronath. However, when Krall tries to get his hands on it, they find that it has already been taken. The crew starts to evacuate. Spock and Bones get in a pod that heads down to the planet. Krall almost kills Kirk until Uhura separates the saucer from the ship, taking Krall with her. Kirk then goes with Chekhov and Kalara as they make their escape. As the pod is ejected, Kirk watches the Enterprise crash to the ground.
Scotty's escape pod nearly flies off a cliff, but he jumps out in time. He is cornered in the forest by the planet's savage inhabitants. Before they can attack him, a scavenger named Jaylah (Sofia Boutella) shows up and beats the savages. Scotty introduces himself to her as an engineer. They agree to work together, with Scotty helping fix something of Jaylah's, and she will help him find the rest of the crew. Jaylah takes Scotty to her home, which happens to be a long-lost Enterprise starship, the USS Franklin.
Spock and Bones have also crash-landed, with Spock getting a piece of a pipe stuck in his abdomen. Bones manages to pull it out and stop the bleeding. The two navigate the area, but they must slow down since Spock is still badly wounded. As they sit down, Spock tells Bones about Ambassador Spock's death. He feels that he must continue carrying out his older self's work on New Vulcan, and he wanted to tell Kirk, but Bones says he probably wouldn't like that.
After landing, Kirk confronts Kalara, thinking she knew what was coming. She defends herself, saying it was to help save her crew. With Chekhov, they rush to find the Abronath on the saucer. Kalara then turns on Kirk, confirming she led them to a trap and that she was working with Krall the whole time. She finds that the Abronath is not where Kirk claimed to have left it. Moments later, the three are ambushed by drones. Kirk and Chekhov manage to activate the saucer's thrusters, which lift the saucer high enough until it crashes down hard, killing Kalara.
Krall captures Uhura, along with Sulu and the rest of the crew. He and his soldiers take them to his base of operations. It is shown that Krall is able to drain people of their life force to rejuvenate himself, as well as alter his appearance. He threatens to kill Sulu for the Abronath, but an Ensign named Syl (Melissa Roxburgh) gives it up, having kept it hidden in the back of her head. He brings Uhura and Syl into a chamber where he demonstrates the use of the weapon. He locks Syl in the chamber and activates the Abronath, releasing a black cloud that wraps itself around Syl and causes her to decompose. Krall intends to use this against the Federation.
Kirk and Chekhov run into a trap that Jaylah set up, encasing them in a crystallized shell. Scotty and Jaylah find them, and she breaks them free when Scotty says they're part of his crew. They team up to rescue the rest of the crew. Scotty fixes the Franklin's beam pad to teleport people onto the ship. They start with Spock and Bones, who are about to get killed by some more drones until they are both beamed onto the Franklin. On the computer, they get a signal on Uhura's location since the necklace Spock gave her is also a tracking device. They see she's with the rest of the crew at Krall's hideout, but Chekhov says they are unable to beam everyone up from there. Kirk figures they need to head in there and come up with their own rescue plan. Jaylah wants no part in this since she knows people who go near Krall's camp never come back alive. Her father fought Krall's right-hand man Manas (Joe Taslim) and was killed. Scotty says she is not alone and can work with the others to save the crew.
Kirk creates a diversion with a motorcycle he found on the ship while Spock and Bones sneak around to take a number of crew members at a time onto a pad and use a beacon to beam them onto the Franklin. Krall's men attack, leading to Jaylah fighting Manas one-on-one. Kirk protects the crew by spreading the crystallizing material to shield them from the villains. As the rest of the crew is saved, only Kirk and Jaylah remain. Jaylah pushes Manas off the pad to his death and jumps to reach Kirk as he activates his beacon, sending them back to the Franklin.
Krall and his army fly toward Yorktown so he can activate the Abronath and kill everyone. The Enterprise crew follows. Spock and Bones beam onto a drone ship and figure out that they need to use a distraction to get by the other drones. Scotty uses Jaylah's music system to create discordant noise with The Beastie Boys' "Sabotage". The drones get obliterated, leaving only Krall's ship plus two others. The Franklin manages to stop Krall's ship, causing it to crash into a fountain.
The crew goes off to find Krall and make sure he's dead. They find two dead bodies drained of their life force, knowing Krall did it. As they continue making their way, they notice a video of the original crew of the Franklin from centuries ago. Uhura spots a familiar face among everyone else. The man she sees is Balthazar Edison, captain of the Franklin, but he is now Krall. Kirk asks to see Edison's old logs, skipping to the last one to see Edison having become jaded and angry with the Federation after his ship has gotten stranded with no help, following his crew's own series of missions. Edison mentioned discovering a life-sustaining force that he intended to use to keep himself alive.
Krall, now looking slightly more like his old self, takes the Abronath to Yorktown's life support hub, which would allow the black cloud to spread throughout the entire starbase. Kirk finds Krall and starts fighting him to take the Abronath away from him. Kirk tries to reason with Krall, but he is no longer the same captain he once was. Kirk's crew attempts to open the doors into space to pull Krall out. Krall activates the Abronath, which starts releasing the black cloud. Kirk avoids getting killed and pushes Krall into the path of the cloud. The door opens and sucks Krall into space with the Abronath, where he is consumed by the cloud and is thus disintegrated. Kirk gets pulled out as well, but Spock and Bones fly in and pull him to safety.
Commodore Paris offers Kirk the Vice Admiral position, but he chooses to remain a captain since he prefers to fly. Meanwhile, Spock goes through Ambassador Spock's old materials. Among them is a picture of the Enterprise crew in their old age.
Bones then brings Kirk to a surprise birthday party for him, with the whole crew there to celebrate. Spock and Uhura reconcile their relationship. Kirk and Scotty pull some strings and get Jaylah into Starfleet Academy. The main crew then sees a new Enterprise ship is being built. With that, the crew recites the original "final frontier" monologue as they resume their mission.
The film closes with the words "In Loving Memory of Leonard Nimoy" and "For Anton".