| Director | Seth MacFarlane |
|---|---|
| Genre | comedy film, fantasy film |
| Runtime | 115 min |
| Country | United States |
| Budget | $68 million |
| Box office | $216 million |
Two years after the events of the first film, Ted marries his girlfriend, Tami-Lynn, six months after John Bennett and Lori Collins divorced. One year later, following a heated argument between Ted and Tami-Lynn, their co-worker Joy suggests to him that they have a baby to keep their marriage alive. When Ted discusses it with Tami-Lynn, they both agree. As Ted cannot father a child, John helps find a sperm donor.
After failed attempts to find a donor and being chased off by Tom Brady for trying to masturbate him in his sleep, John ultimately offers to donate his own sperm, but Tami-Lynn is found to be infertile due to past drug use. Subsequently, the couple decide to adopt. The background checks bring Ted's legal status as a person into question, and the Massachusetts state authorities declare Ted to be property rather than human. As a result, Ted is fired from his job, his credit card and bank accounts are terminated, and his marriage to Tami-Lynn is annulled. John suggests that they take the state to court. Approaching the best lawyer they can find, he assigns the case pro bono to his niece Samantha L. Jackson, a novice lawyer. They are initially reluctant due to her lack of pop culture knowledge but bond over their love of marijuana as they prepare to present the case.
Meanwhile, Donny, Ted's life-long stalker, is now a janitor at Hasbro's headquarters in New York City. He proposes to the senior vice-president to abduct Ted for research to manufacture live teddy bears commercially. Donny convinces him to hire an expert attorney to ensure that Ted maintains his status as property.
Despite Sam's best efforts, the court rules against Ted. Disheartened and desperate, the trio contact Patrick Meighan, a highly respected civil rights attorney, to help overturn the court's decision. During a Manhattan trip to meet him, John and Sam fall in love and eventually kiss. When the trio meets Meighan, he is sympathetic to Ted's plight but ultimately refuses the case, as he believes Ted has not significantly contributed to humanity due to his hedonistic lifestyle. Infuriated at the injustice and jealous of John's relationship with Sam, Ted takes out his frustrations on the two and angrily leaves. He wanders into the New York Comic-Con while Donny, as a Raphael cosplayer, discreetly follows Ted inside. When Ted encounters Donny, he flees and Donny chases him. Ted steals another person's cell phone to contact Sam and John to inform them of his situation, just before Donny abducts him.
John and Sam arrive and find Ted, just as Donny is about to cut him open, so John punches Donny in the face. Ted quickly reconciles with John and Sam. However, as they are leaving, Donny, having regained consciousness, severs the cables holding up a display model of the Enterprise-D, so it swings towards Ted. John pushes him out of the way to save him, but is hit and rendered unconscious. Donny is arrested after Ted exposes him.
John is rushed to the hospital, where he flatlines. The next day, the group is told that he has died and tearfully visits him, but he opens his eyes, revealing that the doctors revived him, then worked with him afterward to prank them. Although Sam is initially furious, she and John kiss as the group rejoices. Inspired by John's selflessness and Ted's emotions over the injured John, which is filmed and shown on the news, Meighan decides to take their case. He successfully overturns the ruling by demonstrating that Ted is self-aware, feels complex emotions, and is capable of empathy. Ted proposes to Tami-Lynn again as they leave court. Sometime later, Ted and Tami-Lynn are remarried and adopt a baby boy, naming him after Rocky character Apollo Creed while John and Sam happily pursue their relationship.