When a visiting reverend from another country pleads Springfield churchgoers for a donation to help the sick children, Bart sympathizes with a boy his own age. Bart has a difficult time asking his parents for a donation, but Homer eventually relents, lending Bart $20. However, Homer almost instantly starts to pester Bart for repayment. Feeling the pressure of Homer's badgering, Bart confides in Milhouse at the playground before a costumed devil makes Bart an offer: if he eats anything for the money, he will be able to get the $20. Bart asks his classmates to help him out of his bind, offering to eat anything except money.
Soon enough, Bart receives offers to eat used chewing gum, orthodontic wax, cinnamon, St. John's wort, and a preserved frog prepared for dissection, even though Lisa warns her brother to not consume the animal. After eating the frog Bart ends up in the hospital. Bart pays his father back the $20 (which Homer had forgotten about), but the hospital bill is $4000. The next day Bart's friends and schoolmates, including Milhouse, shun him for eating the frog. Just when the school bullies are about to attack Bart, a new transfer student named Diggs saves the day with his falcon, Freedom. He reveals to Bart the hidden Falconry Club headquarters behind the school. As Bart spends more and more time with Diggs, he learns about falconry and conducts some mischief around town by teaching Freedom to snatch Springfielders' belongings.
One day, Diggs dives from a high tree branch, resulting in his injury and emergency hospitalization. Bart questions what prompted his new friend to act as he did. Diggs explains he just wanted to fly, alarming Bart with his idea that maybe all people can fly and don't know this because they don't try it anymore. Bart is told to leave the room by an uncharacteristically stern Dr. Hibbert and an unidentified doctor and overhears that Diggs will transfer over to a mental hospital. Homer and Marge recognize what this means, and Marge clues in a visibly horrified Bart that this means Diggs has serious problems and that the mental hospital is "not the kind of a place a little boy should ever visit." Homer suggests that Bart merely resume his friendship with Milhouse. Lisa is very sympathetic to Bart and he is appreciative of the comfort.
Bart goes back to school and leaves the bullies stunned and silent when he responds to their taunting by angrily saying how much it sucks that his friend is mentally ill. When Bart enters the falconry club, Diggs is there climbing through a window, claiming to have gotten a day pass to participate in a falconry contest. At the contest, Diggs unveils to Bart a plan to free all the falcons. Bart helps Diggs enact the plan, and the falcons fly away in a flock. Diggs thanks Bart for his friendship and rides his bike back to the mental hospital, noting he's unlikely to get any freedom for a long time but glad they had the time together they did. Immediately afterwards, Milhouse arrives to apologize to Bart for avoiding him earlier and the two reconcile.