"We had the idea that this is maybe their second mission after the fight with Nero," he says, referring to Eric Bana's rogue Romulan starship commander, which provided Star Trek's villainous impetus.
"So Scotty is still very proud and he thinks he owns the ship, obviously, as he's the guy who does all the hard work. He's very principled and those principles actually define his role in the film in a way."
This time around, Sherlock's Benedict Cumberbatch takes on the part of Into Darkness' primary nemesis in the shape of former Starfleet agent-turned-notorious terrorist John Harrison.
"He's very indicative of something that is going on in society today, which is the enemy within. The fear of the enemy no longer being an other, such as a Russian or a multi-horned alien, as there's now this idea that the threat can come from inside your country.
"Benedict's character is a really interesting and complex character to play because he's at once an enemy and also an ally. He's always manipulating the situation he's in and he's brilliantly Machiavellian." Indeed, Harrison's true identity has been the source of considerable internet speculation, with suggestions he could be one of Captain Kirk's famous adversaries from the original 60s television series.
"It's been really fun to see people trying to figure out who he is playing, whereas all the time it's been quite a simple answer. But I loved working with Benedict, who worked very hard on this film. His fitness regime was incredible because he had to play this almost like Superman."
Despite its title and ominous premise, Pegg promises that Into Darkness isn't all relentless doom and gloom.
"It's not dour or po-faced, as some people mistake Darkness for being a bit too serious. It's a space sci-fi/action-adventure film; it isn't a depressing, gritty social satire.
"The characters have to go through some dark times but I wouldn't call the film dark like other films such as The Dark Knight Rises. It's still fun, it's not heavy, but the peril is no less intense."
• Star Trek Into Darkness is out now.