Plot

A girl named Riley (Kaitlyn Dias) is born, and in her mind, Joy (Amy Poehler) and Sadness (Phyllis Smith) are created. As she grows into a young kid, the emotions Fear (Bill Hader), Anger (Lewis Black) and Disgust (Mindy Kaling) form, each one coloring the memories that power the islands in her mind. Since her first memory was scoring a goal in a game with her parents, she has Hockey Island, in addition to Goofball, Family, Honesty and Friendship Islands. Each island is connected to Headquarters via lightlines, and has the appearance of a small theme park. Joy can see how the other emotions can be useful, except for Sadness, because she doesn't ever want Riley to be sad. When Riley is 11, her father (Kyle MacLachlan) starts a new business, and he moves the family from Minnesota to San Francisco. The room in her new home is tiny, and the moving van with all of Riley's stuff keeps getting delayed, so they don't have most of their things. Determined to keep things upbeat, Joy has Riley start a makeshift hockey game in the living room with her dad, using her stick and a wad of paper. Family Island is churning along. Then, Dad gets a business call and quickly has to leave. Sadness tries to take control, but Joy blocks her out, instead giving Riley the idea that she should ask her mom (Diane Lane) to go get pizza. The pizza mission quickly goes wrong, as only pizza made with broccoli (which Riley hates) is served at the local restaurant. Mom asks Riley what her favorite part of the trip was, and Joy serves up the memory of the time Dad tried to take a picture of them posing in front of a cement dinosaur, failing to realize that the car was rolling down the hill behind him, and it crashed into another dino statue. The memory makes Riley laugh, but then suddenly it turns blue after Sadness touches it. Joy is unable to restore the memory, and orders Sadness not to touch any more memories. Joy then tries to set things right by having Riley slide down a banister, causing Goofball Island to come to life. But then, Riley changes her mind and decides to just walk down the stairs. Dumbfounded, Joy investigates and finds a core memory on the floor, and Sadness standing next to the core memory holder, having caused the memory to fall out. The missing core memory caused Goofball Island to go black. When Sadness tries to touch a core memory, Joy quickly pulls her hand back, knowing that the memories can't be changed back once they're turned sad. Determined to keep Sadness from causing any more trouble, Joy takes her to a large collection of mind instruction manuals and tells her to read them. On the first night, Riley has only a sleeping bag in her room, and she's unable to sleep. Riley's emotions realize that the move was a lot worse than Joy had said it would be. Mom comes into the room and thanks Riley for keeping a happy face through the stressful situation. When Riley finally falls asleep, Joy puts on a happy dream of Riley ice skating with her parents. The next day, Riley has her first day at her new school, and Joy gives assignments to the team, telling Sadness that she should just stand still, and not take the controls at all. When Riley arrives in class, the teacher asks her to introduce herself, and tell everyone about her life in Minnesota. Riley talks about playing on a hockey team, but once again the memory turns blue after Sadness touches it. Joy tries to take the memory out, and sees Sadness taking control of the console. Joy finally succeeds in removing the memory and pulls Sadness away from the console, but not before a new sad core memory is created. Joy tries to activate the memory dump, but Sadness stops her from erasing the memory. In the struggle, all of the core memories fall out, and a happy core memory starts to get sucked into the dump tube, and Joy grabs it and finds herself, Sadness and the core memories getting sucked away. Joy and Sadness get dumped out in Riley's long term memory. From a distance, they can see Riley's personality islands lifeless. Knowing that Riley needs her core memories and can't be happy without Joy at the controls, they set out to make their way back to headquarters. With Fear, Anger and Disgust in charge, Riley can only snap back at her parents when they try to talk to her. Frustrated, Dad sends Riley to her room. Joy and Sadness make it to Goofball Island, where they try to walk the lightline back to headquarters, knowing that one misstep will land them in the memory dump below. When Dad comes into the room and tries to cheer Riley up by acting goofy, she rolls over and faces the wall, causing Goofball Island to crumble. Joy and Sadness barely escape falling into the memory dump, and the other emotions are hoping desperately that Joy will return soon. With Goofball Island destroyed, Joy sets out for Friendship Island. The only path is through long term memory, and Sadness remembers from the manual that it's easy to get lost in there. Joy realizes that if Sadness read the manual, she would know how to get back to headquarters, so she lets Sadness lead the way. With Sadness too depressed to walk, Joy has to spend the night dragging her through long term memory, where they encounter Forgetters, who have the job of sending Riley's faded memories to the dump. One memory they vow never to get rid of is the jingle from an old gum commercial, and they send that one up to Headquarters through a recall tube at random times, causing the song to play in Riley's head. Riley is doing an online chat with an old friend, Meg (Paris Van Dyke), who tells her that there's a new girl on her old team who plays really well with her. Anger is at the helm, and Riley abruptly ends the conversation, causing Friendship Island to crumble. Joy and Sadness plan to head to Hockey Island, but then meet up with Riley's imaginary friend, a pink elephant named Bing Bong (Richard Kind). Bing Bong realizes the urgency of the situation, and tries to help the pair get back to headquarters. Joy remembers the rocket ship he had that was powered by Riley's singing. Excited at the prospect of being remembered again, Bing Bong starts to dance, but then trips and cries. Joy notices his tears are actually pieces of candy. Bing Bong gives Joy a bag to hold the core memories that she's been carrying, and tells her that taking the Train of Thought will get them back to headquarters much faster than walking. Bing Bong knows a shortcut that will take them to a train station in Imagination Land, but Sadness warns her that the path isn't safe, having read about the area in the manual. Undeterred, Joy and Bing Bong head into a building, with Sadness reluctantly following. The building turns out to be abstract thought, and the three of them start to lose their body shape. In the final stage, they become straight lines, and are able to inch their way out of the building, but miss the train and decide to go through Imagination Land to reach another station. In Imagination Land, Bing Bong is able to find his old rocket ship, and they run into Riley's imaginary boyfriend. Bing Bong leads them through Preschool World to get to the station. Riley is at the first tryout for the new hockey team, but without her core memories, she can't play well, and she quits in frustration, causing Hockey Island to crumble. Bing Bong realizes that Preschool World is being demolished, and he loses his rocket. Joy is unable to cheer him up, but Sadness consoles him by acknowledging his grief. For the first time, Joy sees that Sadness can be useful. The three catch the train back to headquarters. Back at headquarters, Anger gets the idea to have Riley run away back to Minnesota to create more happy memories, but decides to let her sleep on it. As soon as she falls asleep, the train stops, stranding the trio. They decide to try to wake Riley up by giving her an exciting dream, and set out for Dream Productions. Joy hands Bing Bong the bag that holds the core memories, and then puts on half of a dog costume, and gives the other half to Sadness. At Dream Productions, there is a crew producing Riley's dream, like a movie. Fear is in charge of the dream, which has Riley in class in her underwear and with her teeth falling out. Sadness has doubts that a happy dream will wake Riley, suggesting a scary dream instead, but Joy ignores her idea, and they come into the dream as a cute dog, surprising the movie crew. Bing Bong starts a party in the classroom with balloons and confetti. He dances around and causes the dog costume to rip in half, and Joy chases Sadness around, causing the dream to be half a dog chasing the other half. The scary scene nearly causes Riley to wake up, but a guard tackles Bing Bong and takes him off to the Subconscious. Joy and Sadness follow in an effort to rescue Bing Bong. They can't get in, but then stand near the doors and pretending that they are escaping from the subconscious, they are caught by the guards, and are shoved in as well. They follow Bing Bong's candy tears and find him trapped in a cage made of balloons, that is built on the side of Jangles, the birthday clown (Josh Cooley), asleep on the floor. They're able to free Bing Bong, and they get Jangles to chase them back to Dream Productions. They tell him that there's a birthday party in Dream Productions, and he takes over the dream, startling Riley awake. Joy and Sadness are able to catch the train to headquarters. Anger is furious that he can't even get a good night's sleep with Fear at the controls, and he decides to follow through with his plan to have Riley run away. Joy acknowledges that Sadness had the right idea to scare Riley awake. Bing Bong finds a box of Riley's memories, and Sadness fixates on one where Riley is celebrating with her teammates. Joy thinks that Sadness has finally come around to her own way of thinking, until Sadness reveals that the memory is actually of the time when Riley missed the winning shot, costing her team the game. Riley sneaks downstairs and grabs her mom's credit card from the purse. At first, it seems that her mom will see her with the credit card in her hand, but mom is too involved in her conversation to notice. Honesty Island collapses, sending the train crashing into a cliff. The three escape just before the train falls into the memory dump. Riley shoves her clothes into her backpack and leaves the house, pretending that she's going to school. Family Island starts to crumble, exposing a memory recall tube. Joy and Sadness realize that they could be sucked up and sent back to headquarters. Riley heads out for the bus station, causing Family Island to quake. Joy and Sadness make it to a tube, but Sadness can't get in without turning the core memories sad, and Joy decides to go back alone. The quake causes the tube to break apart, and Sadness watches helplessly as Bing Bong tries to save her, and they both fall into the abyss. Joy realizes that she's in the memory dump, and tries to climb out. Bing Bong finds her and tells her there's no point. Joy finds the sad core memory that never got stored at headquarters. Dejected, Joy goes through Riley's core memories. A tear falls on the memory where Riley is celebrating with her teammates. Wiping away the tear causes the memory to rewind, and Joy sees Riley, just after she had missed her shot, alone in a tree, looking sad. Moving forward, Joy sees Riley's parents console her, and her teammates lift her up on their shoulders. Joy realizes that Sadness had helped Riley by calling attention to her mood. With renewed determination, Joy finds Bing Bong's rocket ship, and sings its broom engines to life. They try several times, with the ship coming closer and closer to escaping. Bing Bong realizes they won't make it out with his weight, so he jumps out and falls back down to the dump, and Joy safely gets out, only to realize that Bing Bong is still in the dump, far below. He cheers her on, and then begins to fade out of existence. Joy sets out to get back to headquarters and save Riley. Riley's parents realize that she isn't home and call her cell phone. With Anger at the helm, she ignores the call and continues to the bus station. Joy is able to follow a trail of memories that Sadness has touched. Riley is standing in line for the bus, and Family Island starts to disappear. Dissuaded, Anger tries to remove his idea. Joy finds Sadness, but Sadness decides Riley would be better off without her. She hops onto a cloud and flies away. Joy finds the Imaginary Boyfriend Generator. Anger can't dislodge his idea, and the console turns black. Riley is unable to have any feeling. Joy creates a stack of imaginary boyfriends, and forms them into a tower, one standing on top of another. She then climbs to the top, and jumps onto a trampoline, which launches her high enough to catch Sadness in midair. Together, they're propelled back to headquarters, where they crash into the window. Disgust taunts Anger to make him erupt in flames, and then uses him to cut a hole in the glass for Joy and Sadness to be pulled back in. Meanwhile, the bus closes its doors and starts to leave the station. Back at headquarters, everyone looks to Joy to save the situation, but she lets Sadness take control. Sadness is able to remove the idea, and Riley gets off the bus and walks home. Riley walks into her house, and her parents run up and hug her. Joy lets Sadness hold the core memories, which turn blue with her touch. With Sadness at the controls, Riley is finally able to cry and honestly say that she misses her old life. Her parents comfort her, and they all talk about the things they miss. Joy hands Sadness the sad core memory she found, and she takes Joy's hand and they both touch the control button. Riley cries and smiles at the same time. Together, Joy and Sadness make a new core memory with both of their touches. Riley's headquarters gets an upgrade with a new button for puberty. All of the islands are back, along with some new ones. Riley is at a hockey game, with her parents cheering her on with painted faces. Riley accidentally bumps into a boy, causing his emotions to overload. Riley's emotions have confidence that they can work together to help her lead a happy life.