Hiro Hamada is a 14-year-old robotics genius in the futuristic fictional city of San Fransokyo. Raised by his aunt Cass and older brother Tadashi after the death of his parents, he spends his time participating in robot fights, illegally betting money on their outcome. To redirect Hiro, Tadashi takes him to the robotics center at his university, where Hiro meets Tadashi's friends, GoGo, Wasabi, Honey Lemon, and Fred, as well as Baymax, the inflatable healthcare companion robot Tadashi created. To enroll in the school, Hiro signs up for the school's science fair and presents microbots, swarms of tiny robots that can link together in any arrangement imaginable. Professor Callaghan, the head of the university's robotics program, is impressed, and grants Hiro entrance to the university. Alastair Krei, renowned entrepreneur and president of Krei Tech, offers to buy the microbots, but Hiro follows Callaghan's warnings about Krei's questionable business practices and declines to sell them. When Tadashi and Hiro later arrive at the university to find it engulfed in flames, Tadashi rushes in to rescue Callaghan, but the building explodes moments later, killing Tadashi.
Weeks later, a depressed Hiro inadvertently activates Baymax, who follows Hiro's only remaining microbot to an abandoned warehouse. There, the two discover that someone has been mass-producing microbots, and are attacked by a man wearing a Kabuki mask and in control of the bots. After they barely escape with their lives, Hiro equips Baymax with armor and a battle chip containing various karate moves, and they track the masked man to the docks. GoGo, Wasabi, Honey, and Fred arrive looking for Hiro, and the masked man attacks the group. The six manage to escape to Fred's mansion, where they begin to form a superhero team, with Hiro creating armor and accessories for his friends to complement each one's area of scientific expertise.