The film begins with some hoods engaged in a backalley bot fight. A boy named Hiro Hamada asks if he can join in using a seemingly harmless robot of his own creation, and the champion, Mr. Yama, allows him to. However it turns out Hiro was just pretending to be a novice, and his robot easily crushes Yama's. The thug doesn't take it well, and the boy only escapes when his older brother Tadashi shows up. All of them end up arrested by the police, and the kids must be bailed out by their Aunt Cass.
She takes them back home, over the Coffee & Bakery shop that she owns. Tadashi realizes that Hiro has drifted into bot fighting because he's aimless—their parents died 10 years before and Hiro being a genius, has already graduated from high school. He tricks Hiro into coming along with him to a visit to the San Fransokyo Tech University, where he studies.
There, Hiro meets Tadashi's classmates: GoGo Tomago, a tough and mysterious engineering major; Wasabi, a neat freak working with laser plasma; Honey Lemon, a bubbly chemistry major, and Fred, the School Mascot, who loves superheroes and kaiju. Tadashi's own invention is Baymax, an inflatable robot nurse. Hiro also meets Robert Callaghan, Tadashi's professor and mentor.
As Tadashi hoped, Hiro is so inspired by all of this, he wants to attend classes there, but first he must come up with a good science project of his own to be accepted. After much brainstorming, he finally reinvents his magnetic fighting robot into a swarm of needle-sized 'microbots' that can be mind-controlled (with a headband) so they collectively reshape themselves almost instantly into any form.
On the day of the tech show, Hiro's invention is a success with the audience. In fact, a wealthy businessman named Alistair Krei offers to buy them, but Callaghan warns him that he will misuse them. Hiro declines. Just as the group was leaving, a fire breaks out. Concerned over Callaghan, Tadashi runs back inside, only to be caught in an explosion. Both are presumed dead afterwards.
Hiro is depressed for a time afterwards, not interested in going to college anymore. When he drops his battlebot on his foot causing him to say "Ow" aloud, Baymax, who was still inside his carrying case, activates. While trying to convince it that he doesn't need help, Hiro discovers that he still carries one of his microbots—and it's active! While Hiro dismisses it as defective, Baymax thinks that the microbot is trying to go somewhere. Hiro sarcastically suggests that Baymax find out where that is. This causes the literal-minded robot to venture out into the city, using the microbot as a sort of compass to find the rest. Hiro has to run out of the house after him; by the time he catches up, they have reached an abandoned warehouse.
After sneaking inside, they discover machines mass producing Hiro's microbots! They are then attacked by a man wearing a kabuki mask, using the microbots. They barely manage to escape. They report the incident to the police, but are not believed. Also Baymax is running out of power, which causes him to act intoxicated. Hiro is forced to drag him home (and sneak him past Aunt Cass.)
Hiro soon realizes that the fire that killed his brother must have been set intentionally to cover the theft of the microbots. Deciding to take matters into his own hands, he programs Karate skills into Baymax, as well as making a suit of armor for him. Then the two of them return to the warehouse, but it's empty now. Using the microbot they still have, they track the masked man to the docks, where they watch him drag a strange machine from the sea, with a bird-like symbol on it. Right then, Tadashi's friends show up—Baymax, worried about Hiro's emotional state, had called them. When the Masked Man attacks them, Baymax tries to fight back but is no match for the microbots. They are forced to run away in Wasabi's car. After an intense car chase, they end up crashing into San Fransokyo bay—they escape only after Baymax sheds his armor and floats them to the surface.
It turns out however, that they are close to where Fred lives—a huge mansion owned by his rich parents! Fred theorizes that Krei is the Masked Man. Hiro (and Fred, who is a comic book fan) convince the others to help them catch him. To this end, Hiro designs specially-equipped superhero suits for them: Baymax gets a new armor capable of flight and with a rocket punch; Wasabi gets laser blades; GoGo gets a suit with magnetic disks attached that she can use as to move at great speed; Honey gets a purse that can create spheres filled with different chemicals; and Fred gets a "dragon-like" suit that allows him to breathe fire and jump great heights.
After an exhilarating test flight, Hiro and Baymax use his (now enhanced) sensors to detect the villain's biosignals. They find them in a small island off the coast. Baymax flies the whole team there, and they find an abandoned laboratory. After sneaking inside, they find video that shows a secret teleportation experiment, made by Krei for the Army, had taken place here. However it blew up, just as a female test pilot was passing through the portal. The Masked Man then appears, retrieving the other half of the teleporter. The team attacks, but are too unskilled to fight effectively, until Hiro manages to knock off the mask, which is the microbot control device.
Hiro is then shocked to find out that the villain isn't Krei—it's Callaghan! He admits he faked his own death and shows no regret that Tadashi died trying to save him. Furious, Hiro orders Baymax to destroy him, but the robot is programmed to never hurt people. Hiro removes the medical chip, and only then, does the robot attack. The others try to stop it, which gives Callaghan the chance to regain the mask and escape. Baymax is stopped when Honey manages to reinsert the chip.
GoGo, Wasabi, Fred, and Honey call out Hiro on him ordering Baymax to destroy Callaghan, but Hiro is too angry and driven by revenge to listen. With Baymax's sensors damaged during his unwitting rampage, Hiro flies home to repair it, leaving the others behind.
Once at home, Hiro repairs the sensor and is about to take out Baymax's medical chip, but Baymax will not allow him to remove the chip, knowing full well Hiro wants to kill Callaghan. Baymax asks if this is what Tadashi would have wanted, and Hiro tearfully exclaims that his brother is gone and is never coming back. Baymax then shows (on his chest TV screen) a series of recordings it made of Tadashi's attempts to create him. This reminds Hiro that his brother wanted Baymax to be used to save lives, and apologizes to Baymax for what he did. Honey, GoGo, Fred, and Wasabi arrive at Hiro's lab (having been picked up by Fred's private helicopter) and comfort an apologetic and remorseful Hiro. Hiro's friends swear that they will bring in Callaghan, and they will do it right.
While reviewing the lab's footage, they discover that the female test pilot who disappeared during the failed test was Callaghan's daughter! Fred realizes this means he's out for revenge. And right at that moment, Krei is inaugurating his latest building. Callaghan arrives with the rebuilt teleporter, sets it up to swallow the building, and captures Krei, saving him for last.
The heroes show up and try to convince Callaghan to stop, but Krei's panicked attempt to buy his freedom only causes Callaghan to harden his resolve. They attack but are once more overpowered by the microbots. Hiro then realizes they must destroy the microbots first to defeat him. He encourages the others to 'think of another angle' (Tadashi's catchphrase). They do, and each finds a way to escape and continue fighting. Eventually, Callaghan finally runs out of microbots to fight with (as most of them are swallowed by the portal.) and Hiro and Baymax are able to destroy his kabuki mask controller.
The portal then falls to the ground, Krei is rescued and Callaghan is captured. Krei warns that the portal is unstable and will collapse any minute. But Baymax detects a lifeform inside! Hiro deduces that it's Callaghan's daughter. He and Baymax agree to dive in to rescue her.
Inside the other dimension, they soon find her capsule where she is in "hypersleep". But as they push her back out, Baymax gets hit with a large piece of debris and his rockets are ruined. The only way to get out now is by having Baymax push them away with his rocket punch—which will leave him stranded. Hiro protests this, but Baymax convinces him. Sadly, Hiro gives the command phrase, "I am satisfied with my care"—without which Baymax cannot abandon a patient—and the latter shoots them out just as the portal collapses.
Later, as Hiro unpacks in Tadishi's old office we see that he has kept the rocket fist and discovers that it is holding something—the medical chip! Building a new Baymax body and installing it allows Baymax to re-activate with this memories of Hiro intact.
The movie ends with a montage of the things the characters will do in the future that continues into the end credits.
...There is a post-credits scene where we find out that Fred's dad looks just like Stan Lee but was (unknown to him) a super hero too!