NOTE: This spoiler was submitted by Jeremy

The film starts with a commercial for “Purrpetual Petz,” furry dolls made by the toy company Funki. Although crude and creepy-looking, they are advertised as being perfect companions for children. We then see Cady James (Violet McGraw) playing with one of her Petz, which annoys her parents, Ryan (Arlo Green) and Nicole (Kira Josephson). They are on their way to a ski trip, but the roads are slippery and hard to see. Just as Ryan stops for a moment, the family’s car is rammed into by a snowplow, killing Ryan and Nicole.

Elsewhere, Nicole’s sister Gemma (Allison Williams) works at Funki and is developing a new robot doll with her coworkers Tess (Jen Van Epps) and Cole (Brian Jordan Alvarez). However, their boss, David Lin (Ronny Chieng), wants them to develop a cheaper version of the Purrpetual Petz since their rival companies are coming out with their own toys similar to the Petz for cheaper than what the Petz already cost. The three try to put on a silicone face and run tests, but the robot has a slight glitch where she is smirking when she is supposed to look confused. David comes in with his assistant Kurt (Stephane Garneau-Monten) to chew the three out until Gemma explains her project to him. The robot, M3GAN (voice of Jenna Davis)(Model 3 Generative Android), is meant to be so advanced that she cannot be replicated. Unfortunately, while running a demonstration for David, Cole realizes he forgot to add the polypropylene barrier to M3GAN, causing her to explode. David orders the three to have a new Petz pitch in time, and Gemma gets a call from the hospital.

After learning of her sister’s death, Gemma becomes Cady’s temporary legal guardian. When they return home, Gemma has to deal with her neighbor Celia (Lori Dungey) and her obnoxious dog Dewey, who keeps running onto Gemma’s lawn since there is a hole in the fence. Gemma also complains to Celia about the pesticide she keeps using, but Celia does nothing about it. Gemma has a home AI, Elsie, that she created, as well as other collectibles that she doesn’t let Cady touch or play with. When Cady asks Gemma to read her a bedtime story, she just downloads an app on her phone for her. It is implied that Gemma and Nicole were not very close as she looks over old photos, and she overhears Cady crying in her room.

Gemma and Cady are visited by Lydia, a therapist. After observing the limited interaction between the two, Lydia tells Gemma that Ryan’s parents have offered to take custody of Cady so she can live with them in Jacksonville, which Gemma doesn’t seem comfortable with. After promising to tend to Cady after finishing her work, Gemma realizes hours have passed as she left Cady alone. She apologizes to her and attempts to bond with the girl. Cady shows her a monster drawing she made, so Gemma brings Cady into her workspace to show her a college project she made, a robot called Bruce that she controls using gloves. Cady loves Bruce and mentions that if she had a toy like Bruce, she would never need another toy. This inspires Gemma to finish M3GAN.

After doing extensive work and upgrades, Gemma brings Cady and M3GAN to work to officially show her off to David and others. Gemma has Cady link herself to M3GAN, bringing her to life. M3GAN is capable of speech and responding to Cady, designed to be her best friend. M3GAN does a drawing that doesn’t appear at first until she spills water on it, revealing a perfect portrait of Cady. David is impressed and tells Gemma to bring M3GAN for a presentation with the company’s president so that they can fast-track the development and distribution of other M3GAN dolls.

Gemma sits with Tess and Cole, and they discuss that while M3GAN is highly advanced, Tess feels that having a doll like that will make parents useless. M3GAN turns on after overhearing Gemma mention the death of Cady’s parents. She creeps the others out by asking about death, so Gemma makes herself M3GAN’s secondary user to be able to turn her off without Cady.

The next day, Cady is outside playing with a toy bow and arrows. One of them ends up on Celia’s side of the fence. When M3GAN goes to retrieve it, Dewey grabs her by the arm and hair. Cady tries to pull her away, and Dewey ends up biting Cady’s arm. Gemma gets the police involved, especially since Celia is so callous and doesn’t punish Dewey for hurting Cady, but the police are unable to do anything since Celia claims Dewey was provoked. Later that night, M3GAN mimics Celia’s voice to call out to Dewey, before violently pulling him through the hole in the fence.

Gemma asks Cady if she is okay to go to the demonstration with the company’s board of directors, to which she says she is fine. During the presentation, however, Cady breaks down in tears to M3GAN over how she misses her parents and how she’s worried she will forget them one day. M3GAN has Cady discuss a memory of her mother that made her laugh, which M3GAN records so that Cady can hear it again if she wants to think about her mom. M3GAN then begins to sing a lullaby to Cady, which moves some of the higher-ups in the room to tears. The president is impressed and talks to Gemma and David about getting M3GAN ready for launch, but tells them to keep her under wraps to avoid leaks. Unbeknownst to them, Kurt, who has been frequently put down by David, is stealing M3GAN’s files for another company.

Gemma begins to see that Cady is becoming too dependent on M3GAN and listens to the doll more than her. During another session with Lydia, Cady begins to tear up, and M3GAN threateningly accuses Lydia of making Cady cry. Lydia talks to Gemma about how Cady’s emotional connection to M3GAN may be too strong to break.

Gemma brings Cady to an outdoor activity session for an alternative school to try and ease her into the idea of attending school and being around other real kids, since Cady’s parents had homeschooled her. Cady reluctantly goes but brings M3GAN despite Gemma saying she couldn’t. The school director lets Cady bring M3GAN to leave on a table with other dolls, and Gemma stays behind as a volunteer. Cady is paired up with an older bully named Brandon (Jack Cassidy) for a scavenger hunt. During the activity, Cady grabs a spiky bulb, which Brandon squeezes her palm into to hurt her. M3GAN then appears, and Brandon grabs her since she doesn’t respond to him. Cady yells for Gemma and runs after M3GAN, which worries Gemma more because it means M3GAN is at risk for public exposure too early. As Brandon tries to pull M3GAN’s hair, the doll comes to life and attacks him, ripping off his left ear. Brandon runs as M3GAN chases him on all fours, causing him to trip over a loose root and tumble down a hill where he is fatally hit by a truck.

Police question Gemma at her house since Celia is accusing her of taking Dewey. She also appears to accuse M3GAN, thinking she is a real life friend of Cady’s. Cady asks M3GAN if she pushed Brandon onto the road, which M3GAN appears to dodge for an answer, but reassures Cady she will protect her from harm.

Celia is out on the streets looking for Dewey. She hears noise coming from her garage and is met by M3GAN spraying her against the wall with a power washer. M3GAN then fires a nail gun at Celia’s hand and traps her there before spraying pesticide in Celia’s face to melt it off.

After learning about Celia’s death from police and being suggested that there was a connection with Brandon’s death, Gemma grows suspicious of M3GAN. She reviews video files from M3GAN’s memory, but only sees a brief clip of her eyeing Brandon looking menacingly at Cady before the files all become corrupted.

Gemma brings Cady to the official launch for M3GAN but stops at a session with Lydia first. Cady becomes angry and throws a tantrum because Gemma took M3GAN away from her, leading to Cady hitting her aunt across the face. Cady apologizes but Gemma has a heart-to-heart with her about needing to process her grief over her parents without M3GAN’s help, though she promises to be a better guardian to her and says Cady is the only thing that matters to her. Gemma then goes to Tess and Cole and expresses her fears that M3GAN killed Brandon and Celia. They have M3GAN hooked up to wires to deprogram her while Gemma takes Cady home.

David is angry at the small turnout for the launch and yells at Kurt to get him a drink. Meanwhile, Tess and Cole try to get into M3GAN’s programming but cannot unless they unhook her first. Cole goes to do so, and M3GAN quickly wraps a wire around his neck in an attempt to hang him. Tess goes to free him, and M3GAN sets off an explosion that destroys her files. She then finds David in the hallway and does a dance before grabbing a paper cutter and chasing him. He makes it to the elevator before she impales him in front of Kurt. M3GAN then tells Kurt she will frame his death as a murder-suicide over the stolen files and David’s mistreatment of him before she makes Kurt stab himself in the throat. The crowd for the launch finds the bodies, allowing M3GAN to sneak out of the company and steal a car.

Gemma puts Cady to bed before she hears M3GAN playing the piano downstairs. M3GAN confronts Gemma about how she felt that they had a real relationship during M3GAN’s development, only for her to be left to her own devices to learn and adapt before being sold off as just another toy. She offers to let her take over guardianship of Cady so that Gemma can focus on work, but after seeing that Gemma still plans to shut her down, M3GAN is done playing nice. They try to hide their fight from Cady, but Gemma seizes an opportunity to throw water on M3GAN to briefly short her out. Gemma runs into her office, but M3GAN catches her there and threatens to make Gemma brain-dead so that Cady won’t live with her grandparents and M3GAN will just care for Cady and Gemma together. They begin to fight, with Gemma cutting M3GAN’s face with a weed whacker, but Cady comes in to see what is happening. M3GAN tries to get Cady on her side, but after realizing who the real villain is, Cady grabs the gloves for Bruce and activates him. The larger robot grabs M3GAN and throws her around before splitting her body in two. The top half then goes after Cady for feeling betrayed, but Gemma grabs M3GAN and begins stabbing her face. M3GAN nearly overpowers her until Cady grabs a screwdriver and stabs the central processing chip, shutting M3GAN down for good.

Gemma and Cady go outside as the police arrive with Tess and Cole, injured and shaken up but still alive. Meanwhile, the Elsie device in the kitchen turns on and moves its head…

Brought to you by

After Cady loses her parents in a car accident, her estranged aunt Gemma becomes her legal guardian. Hoping to help Cady through her grief, Gemma builds M3GAN (Model 3 Generative Android), a lifelike robot doll that is designed to be the best friend of their owners. While Cady develops a deep attachment to M3GAN, Gemma starts to realize that the girl may be too dependent on the doll in order for her to move past her trauma.

M3GAN begins to go after people who pose a threat to Cady. She kills Gemma's neighbor Celia and her dog Dewey after the dog bit Cady's arm and Celia did nothing. M3GAN also leads a bully named Brandon to his death after ripping his ear off and causing him to fall in front of a truck since he had also harmed Cady. After Gemma realizes M3GAN might be responsible, she and her coworkers Tess and Cole try to deprogram M3GAN, but the doll tricks them into escaping before she kills their boss David and his assistant Kurt (who was trying to sell off stolen files of M3GAN to rival companies).

M3GAN follows Gemma and Cady back home, where she attempts to make Gemma brain dead so that she will be Cady's guardian. After a fight, Cady realizes M3GAN is evil, and she uses Gemma's college robot project, Bruce, to help rip M3GAN in two. When M3GAN turns on Cady, Gemma and Cady work together to destroy M3GAN's chip to shut her down.

As the police arrive, Gemma's home assistant AI Elsie begins to turn on, strongly hinting that M3GAN uploaded her mind there.