There’s a curse going on at Fosters Home for Imaginary Friends so the gang must find out who causing the curse.
In San Jose, young boys Chris and Marty enter 1123 Wilson Way, Fosters Home for Imaginary Friends on a dare, but are scared away by four imaginary friends like monsters, Bloo, Wilt, Coco and Eduardo.
Meanwhile, following the death of her father, neurotic and spoiled heiress Ellen Mortimer discovers she has only been left 1123 Wilson Way in his will while his vast wealth has gone to several charities. Ellen and her assistant, Horace, find a map within the will's papers that tell of an alleged treasure hidden inside the foster home, but find the property strange invade by Bloo, Wilt, Coco, Eduardo and their business head of household, Mr. Herrimen, and unsuccessfully attempt to force the monsters out by way of paranormal experts and a demolitions team.
Four lonely imaginary friends watches a news report about imagination therapist Clifford Lyon and is instantly smitten with his littlest sister, Anna, prompting Bloo to inspire Ellen in summoning Dr. Clifford to Fosters. Clifford and Anna are estranged due to his reputation and obsession with contacting the ghost of their late parents, Dr. and Mrs. Lyon. The Lyons Children move into Fosters, but Bloo, Wilt, Coco and Eduardo's attempt to befriend them fails when Mr. Herrimen to torment and scare them away, which eventually fails.
The imaginary friends gains the Lyons children trust when they serve them breakfast, and follows Anna to school, when she becomes popular when her class learns she is living in Fosters, and agrees to host their Halloween party. Her envious classmate Zally plots with her best friend, Dom, to humiliate Anna during the party. Clifford attempts therapy session with Mr. Herrimem, who not only try to avoid him, but also reveal he know Dr. and Mrs. Lyon; in exchange for convincing Ellen to leave them alone. He promise to go through the "red tape" involved to get Clifford to sing him a funny bunny song, which he used to sing to his creator, Madam Foster, before she died.
Anna learns the fosters home have been cursed that all imaginary friends except the five disappearance, and restores their old playroom to remind Bloo, Wilt, Coco and Eduardo. Bloo recognizes the old vase when he used to live with his long-lost creator, Mac, and remembers how they are bully by Mac's big brother, Terrace and their mother wants Mac to get rid of Bloo because he is 8 year-old like Anna, so they found fosters as Mac visit Bloo every day until the curse happens as he and Madam Fosters granddaughter, Frankie are on the quest to find out who is causing the curse but never came back. A newspaper article reveals that Madam Foster was declared legally insane after she built a machine, the Imaginary-Lazarus, which she claimed could bring the death imaginary friends back to life. Anna and the Imaginary Friends venture to the secret basement and find the Imaginary-Lazarus. Ellen and Horace sneak inside, steal the formula that powers the Imaginary-Lazarus, and plot to use the machine, believing it could grant them their own imaginary friends. However, they attempt to kill each other to test the theory and retrieve the treasure they think is in the basement's locked vault; Ellen falls off the cliff but a evil imaginary friend, Count Warlock rises to save her.
Dr. Clifford becomes despondent after Mr. Herrimen prank him, prompting him to take him out of town. He know how much he miss Madam Foster, Frankie and Mac and miss the old foster adventures, but have a change of heart after a drunken Clifford declares he will tell Ellen off so he can stay in his home. However, Clifford accidentally falls but being rescued by a superhero imaginary friend.
In the laboratory, Ellen and Count Warlock confronts Anna, Bloo, Wilt, Coco and Eduardo, stealing what they believes to be the treasure from the vault and launching Horace out of the window when he tries to double-cross Ellen for made a new friend who is a one who causes a curse in Fosters after murder Madam Foster. Anna and the Imaginary Friends trick Count Warlock into saying that he has no unfinished business on earth, causing him to eject himself into the erase, then Eduardo launches Ellen out of the window. The Treasure is revealed to be Madam Foster's money and Frankie's old doll when she was about Anna's age; The so-called map was part of a antique Frankie play with her grandma (thurs, Ellen would've been furious to know that her new imaginary friend went through all that trouble for nothing). Dr. Clifford, has been rescued by a super imaginary friend, ImaginaryMan, returns with Mr. Herrimen, and the imaginary friends restore the rest of the imaginary friends back to life and what they brought back was Cheese, Jackie Khones and Fluffer Nutter, but not the rest, included Mac and Frankie.
The Halloween party kicks off upstairs, and Zally and Dom's prank is thwarted by the talking minor, and they flee in terror. A boy dances with Anna revealing it was Mac who was trapped in the picture, along with Frankie the whole time but Bloo, Wilt, Eduardo and Coco had their wish granted by Dr. and Mrs. Lyon, now are angels, who meets with Clifford and tells him that they were so content with their children while alive that they have no unfinished business, and encourages him to move on, explaining that the imaginary friends kept their promise to how to break the curse. Dr. and Mrs. Lyon departs as clock chimes ten and, after Mac kissing Anna, the curse has been broken and all the imaginary friends (including Frankie) are all back from the vanishing world, scaring off the guests. Mac and Frankie told Bloo, Wilt, Coco and Eduardo that they were cursed into a picture by Count Warlock which reason why they never came back to Fosters. Anna is impressed with the party, which Clifford says is not over, cueing Mr. Herrimem and the rest of the imaginary friends plays "We Come Together" for them to dance to.