The movie begins at Techno Reef, where the Techno Trolls gather for a massive rave as their leader King Trollex is about to drop his latest song. After the song drops and the Techno Trolls enjoy their music, a shadow approaches in the distance.
King Trollex stops the party and approaches by himself. Queen Barb of the Rock Trolls greets him, and tells him to hand over the Techno String. When Trollex refuses to do so, she and her Rock Trolls attack. They send the Techno Trolls flying and destroy Trollex's DJ booth. To try and limit the damage and preserve his peoples' vibe, Trollex agrees to hand the String. Barb tells him that when she's done, they're all going to have the same vibe.
At Troll Village, Queen Poppy begins her morning routine and starts singing the Trolls' morning medley. During this, Branch starts to think about taking his and Poppy's relationship to the next level and states he just has to get the guts to tell her she is the one. He joins in the medley. During the medley, Poppy and her friends witness the birth of Tiny Diamond, Guy Diamond's newborn son who turns out to be a Hip hop Troll. The medley continues as the Trolls now celebrate his birth.
At the end of the medley, Poppy and Branch see everyone off about their day. Branch then tries to talk to Poppy and tell her how he feels but he can't say the words, Poppy ends up revealing that she considers him a friend. The word "friend" echoes in his mind and he zones out. Trying to make up for it, the two try and high-five each other but fail, though Poppy then succeeds with Fuzzbert.
Their attention is turned to Biggie, who's being attacked by a bat. Poppy takes it away from him but now has it in her hair. Branch calms the bat down and attention is drawn to a message it was carrying. Poppy reads about a big event Queen Barb of the Rock Trolls is hosting and to bring the Strings. An anxious King Peppy takes the message from her and attempts to destroy it, but Branch calms him down. Peppy explains that other Trolls besides them exist, and they're called "Pop Trolls". This makes sense to them, and they all nod in agreement. Poppy wants to hear more about the other Trolls, but Peppy explains that they're very different from them, while Cooper takes note of Peppy's words about there being different Trolls. He causes the entire village to freak out when he says some don't understand the concept of "Hammertime".
The group breaks down to Poppy and The Snack Pack members. Peppy explains that in the beginning, everything was boring until a Troll made a note that caught everyone's attention. This was the start of the Trolls love for music and they took six Strings, one for each type of music: Pop, Rock, Country, Classical, Techno and Funk. Then over time, arguments broke out over their differences leading to arguments. The Tribes' elders decided it was best each Tribe took a string and go their separate ways, and ever since the Tribes have been isolated from each other.
Peppy shows them the String, which he explains has a lot of power. Peppy wants to run and hide while Poppy wants to go meet Barb, whom she thinks is trying to unite the Trolls again. Peppy and Poppy get into a row over what is best. Later that night, Poppy goes to sneak out in Sheila Balloon, but is caught by Branch. Cooper hears them talking and watches from a nearby bush. Poppy unties the balloon and starts to float away. Branch is unable to just let her go, so he jumps into the balloon. After they leave, Cooper realizes one of the Trolls looks just like him; he leaves Pop Village to find them.
The next morning, Barb leaves the Ocean and arrives onshore. She nips into her Angler Bus and shows off the Techno String. She places it into her guitar, converting it to the Rock String's power. As she sits down, she thinks her father King Thrash is missing, but it turns out that he's just in the toilet. As he leaves, she explains to the senile old Troll the plan to get the Strings and play the Ultimate Power Cord. The Old King goes to do the Rock hand gesture, but needs Riff's help to finish it.
Poppy and Branch try to fly the balloon, but the manual is big and Poppy tries to learn without it, which leads Sheila to tell her to stop. They discover Biggie has stowed away on the Balloon, hidden under the cotton candy Poppy brought with her, since Mr. Dinkles was attracted to it. Poppy explains they're going to help Barb unite the Trolls.
As they approach Symphonyville, they discover that Barb has already arrived ahead of them and everything is in ruins. Pennywhistle, the sole survivor, tells them that Barb took their string from Trollzart and all the Classical Trolls, leaving nothing left behind - they lost everything. Poppy comes to the realization Barb wants to destroy all music. Biggie freaks out over this, so Poppy does a Pinky Promise that no matter what she will protect him.
Meanwhile, as they leave the mountains, Barb's bat "Debbie" returns to her owner, carrying a reply from Poppy and having been given a makeover to the horror of Barb herself. Barb reads Poppy's message saying she hopes to be best friends with Barb, but Barb doesn't understand how someone can be friends as it takes years to form a friendship. Just then, a glitter bomb goes off in Barb face, and Barb has a rant about Pop music. When her father starts to sing the Pop song from the message, Barb has had enough and brings in the Bounty Hunters Chaz the Smooth Jazz Troll, Tresillo and his reggaeton Trolls, The K-Pop Gang and The Yodellers. She explains that she plans to make Rock the dominant music, but will spare whoever brings her Queen Poppy and let them have a tiny territory, stressing to Tresillo when he comments on the size that's the offer. Only the Yodellers didn't show to the meeting, but Barb is confident they'll bring in Poppy as she burns Poppy's message.
The Pop Trio arrive at Lonesome Flats, home of the Country Trolls. At first, there is no one around, but high noon hits and the mayor, Delta Dawn, appears singing, which brings out all the Country Trolls. Poppy comments that the song is sad. Branch likes it, but Poppy thinks they don't know that music is supposed to make them happy. Delta feels sorry for the trio as they "look like they were beaten up by a rainbow", and isn't bothered by them. Poppy attempts to cheer them up by singing a medley that covers all the most important songs. Soon the three find themselves alone as the Country Trolls hide from their music.
Delta throws the three in jail for "Crimes against music". When Poppy warns Delta about Barb, Delta isn't worried about her. Poppy has to face that some Trolls don't want to have fun and Branch tries to cheer her up. They begin "plan B", and Branch and Biggie start to dig their way out with the intent to return home. Hickory abruptly shows up and busts the trio out. They escape on the Jail door as Delta, Clampers Buttonwillow, Growley Pete and a number of other Country Trolls give chase.
The four Trolls ride over the edge of a ravine to escape Delta. After falling into the river below, Delta is annoyed that they escaped. The four Trolls survive the fall into the river, with Mr. Dinkles being pulled back from a near-death experience by Biggie. Branch has questions as to why their new friend helped. Hickory explains he didn't think it was fair they rushed to discriminate against the Pop Trolls. He builds them a boat to make getting to the Funk Trolls faster.
During the river journey, Branch wonders in mistrust about Hickory, but Poppy is fine with him and wonders if Branch is questioning her judgement. As the Trolls settle for the evening, Chaz attacks. The three Pop Trolls are put under a trance and when they snap out of it, they're tied up. Hickory kicks Chaz off the boat, thus saving them as he put gumdrops in his ears to block out the noise of Chaz's smooth jazz music. Biggie freaks out as it's clear Poppy cannot keep them safe, thus breaking her Pinky Promise. He leaves to head back to Pop Village.
Meanwhile, Cooper is lost in the desert and tries to drink from a mirage. He snaps out as he's taken by a strange force.
On the river, Hickory sings and confronts Branch over his obvious feelings for Poppy. Branch notes he tried to tell her how he felt about her but failed. Hickory notes of the two of them that Branch is doing all the listening, thus she may not even hear him right now. They come across a large object in the sky and are taken by a bubble beam, with Branch and Hickory landing hits on each other as they try to fight it.
The three arrive in the flying city of Vibe City, and are greeted by a Funk Troll whom they think is Cooper. He turns out to be Prince D, Cooper's twin brother. Cooper introduces them to King Quincy and Queen Essence, his parents. When D states he's half-Hip Hop, Poppy questions her map, which D comments is likely out of date. Branch notes it still has Disco on it. When Poppy speaks about how they're all alike, Quincy states they're not. Poppy suggests to combine their efforts, with Quincy stating that they'll do anything but that.
They then reveal the true history of the Strings. Prince D sings and explains that in the past, what broke the Tribes up was the Pop Trolls themselves. The Pop Trolls stole the six strings to play only remixes of all the other music. The other Trolls finally got their Strings back, but the damage was done and everyone no longer trusted that this wouldn't happen again, so they split.
When the song finishes, Quincy and Essence explains that denying their differences would be denying who the truth of who they are. Poppy comments they hadn't thought about this. The alarm goes off and the Funk Trolls prepare for battle as Rock has arrived. Cooper sends his friends on their way to protect them, despite Poppy's plea to let them help. As the trio leaves, the Funk Trolls are plunged into darkness as Riff pulls the plug on their lights.
As the trio float away from Vibe City, they see the Rock Trolls arriving and Poppy wants to go back. Branch finally puts his foot down and tells Poppy its time to go home. Poppy defends herself as wanting to prove she is a good queen, but Branch points out a good queen listens and she has not been, not to her father, not to Biggie, not to Quincy and not even to him. He has backed her up throughout the journey even when she was wrong. He replies he heard back there that differences do matter - like them.
As their bubble lands and bursts, the two have a fight and Branch leaves for home and abandons Poppy, stating as he departs that she's the most important person to him right now. Sad, Branch begins to sing Perfect For Me, a song in the vein of the Country Trolls' sad style. Poppy joins in despite them being far apart at this point. When Branch finishes the song, The K-Pop Gang arrive and capture him. They demand he takes them to Poppy, but Tresillo and his Reggaeton Trolls interfere. The two groups can't live without their music and dance off against each other for Branch. Branch stops them and makes a proposal.
Poppy meanwhile reflects on her thoughts with the String. She puts it away when Hickory arrives, but in her despair at the situation accidentally pulls it out in front of Hickory. It is then revealed Hickory, along with his brother Dickory have been pretending to be a Country Troll together to get close to Poppy. Dickory tries to take the String while Hickory attempts to help Poppy. Their yodelling grabs Barb's attention, and Poppy is snatched by Carol and another Rock Troll. Dickory hands Barb the Pop String and Barb confronts her worry, commenting on how short Poppy is compared to her and how she didn't know why she was worried about her. As the two interact, Barb reveals she has already attacked Pop Village.
Biggie arrives at the village, and finds the surviving members of The Snack Pack. They make costumes and attempt to break into the Rock Trolls' home to rescue Poppy. During their intrusion though, Sid Fret and another Rock Troll catch them. The group convinces them that they're also Rock Trolls, but this lands them into Barb's backup band. Smidge comments "We're screwed".
Elsewhere, Barb brags to Poppy about how she's basically won and asks if Poppy enjoys being Barb's best friend as a mockery of Poppy's earlier message, Poppy comments they are not friends. Barb reflects that as a Queen she's used to hearing people, telling her what she wants to hear and not really being friends. She puts the Pop String in the guitar and comments she'll play the Ulimate Power Cord, then Poppy will see what happens.
On stage, Barb sings while The Snack Pack pretends to play along in fear, while Peppy and the Funk twins are hurried forward to the front. When attention is drawn to them, Biggie smashes a guitar shouting "Barracuda" and it seems to get attention off of them. Barb then introduces the Trolls to their former leaders, calling Pop "the worst of all". As Barb goes to play the Ultimate Power Cord and hit Poppy with the power of her guitar, she is hit with the balloon manual as Shelia Balloon appears carrying Branch, the K-Pop Gang and the Reggaeton Trolls. This proves to be a temporary setback as Barb begins to play again. Branch swings over to Poppy and throws himself in the way, where he was a large boulder falls to the ground. When it smashes open, Branch has been converted into a Rock Zombie.
Barb is hooked up to an Angler Bus and flies around the stage converting the other leaders into Rock Zombies. She turns back to Poppy who has opened her cage, she gets Branch to use his mullet to grab her and then hits Poppy with the Power Cord. At first it appears as though Poppy is converted, Barb hands her the Guitar so she can convert Peppy and the Funk Twins, the final members of the leaders' family, but Poppy turns to face Barb. Poppy used gumdrops to protect herself from Barb's Power Cord. Poppy tells Barb that she won't let anyone else be converted. Riff interrupts and speaks up against Barb, questioning how anyone could know they're cool if they all look the same, as some of the Rock Trolls see Poppy and Riff's point of the outlook and agree.
Poppy also tells Barb that a good queen listens and that real harmony takes a lot of different voices. She proceeds to destroy the guitar, snapping the Strings and reverting Branch, Queen Essence, King Quincy, Trollex, Delta Dawn and Trollzart, and her Rock Zombie appearances back to their normal selves. However, every Troll becomes grey in the process as the music fades from every Troll present, and with them the Trolls have lost all music, including rock. When Poppy goes to make sure Branch is okay after he was reverted from his Rock Zombie form, Barb witnesses in horror that the Strings have been destroyed as they fade away. Barb then puts the blame on Poppy, stating history has repeated itself with Pop ruining everything once again. Depressed, the Trolls take a moment to let it sit and face the fact that their music is gone, but Cooper feels a beat within him as he realizes that music is still in his now-glowing pink heart.
As Cooper uses a microphone to amplify the rhythmic heartbeat for everyone to hear, his brother Prince D begins to make a hook beatboxing sound as he joins in, with all the other Trolls witnessing this. Queen Essence notes that her sons are making music; Delta Dawn feels the beat with her lit-up heart as she begins to clap and stomp her feet along to the melody, who then turns to her Country Trolls who also join in. The beat continues as everyone's hearts light up while the Trolls begin a simple background harmony in unison. Essence states Barb can't take their music from them, while Quincy states that while it all started with the Strings, it now comes from within themselves. As the other Troll tribes vocalize melodically with all their hearts lit, Trollex says the music comes from their experiences, Delta adds their lives, and Essence adds their culture; Trollzart simply calls the harmony beautiful. Poppy finally understands the thing she hasn't grasped about differences, knowing Barb can't take away the music that is within all of them.
Now knowing that differences matter after all, Poppy steps forward and begins singing. She's soon joined by Branch, both becoming the first to regain their colors. Barb asks Thrash what's happening, to which he replies that she must let everyone be what they want to be, as he plays music and regains his colors too. As Poppy and Branch continue singing, the other Tribe leaders join one by one; every Troll slowly recolors as they join in, until Barb is the sole remaining grey Troll. Near the end of the song, Barb finally joins, as she plays her guitar in which she recolors, her hair becoming rainbow-colored as she accepts other Trolls' music with the help of her father. Poppy's hair also colors up with rainbow colors, with the Trolls now united at last.
The song ends with all leaders standing side by side and an united Troll Kingdom. When Poppy tells Barb now she isn't forcing her and she'd like to be friends with her, Barb finally agrees. In the meantime, Branch concurs with Poppy and confesses his love to her, to which she states back she loves him too; the pair finally do a connected high-five, which begins their relationship as more than just friends. As the camera pans out, the pair can be seen kissing.
Back at Pop Village, Poppy tells the new version of Troll history on how their ancestors were wrong to young Trolls from each Tribe. She's joined by Branch as she says you can't harmonize alone. The two depart and the Pop Village celebration begins. The Trolls interact and have fun.
The ending credits conclude with Poppy and Branch riding into the sky, Debbie following them. As the movie closes, King Gristle Jr. and Bridget appear, having missed the Trolls' party.