Donkey is first seen with an old lady who was his owner and the two of them, along with other characters, were in a line for people who had fairy tale creatures and they exchange the creatures for money. When she was there, Donkey refused to talk and the knights took her away. Then, Donkey accidentally gets hit by fairy dust from a fairy, (which Peter Pan was taking in to sell) making him fly. He exposed himself by talking while flying, but after the few seconds of him flying, it was over and he hit the ground. The knights tackled him, but he was still able to escape from them fast enough and literally bumped into Shrek. Shrek scared the knights away by posing as the giant, and after that, Donkey wanted to be Shrek's friend to repay him. Shrek was annoyed by Donkey, so he tried to scare Donkey away by roaring at him, but Donkey wasn't scared. Donkey told Shrek that he does need a few tic-tacs for Shrek's stinky breath as he followed him to his home.
Donkey pleaded to stay, but Shrek kicked him out, so Donkey stayed outside.
Then, at night, Shrek found many other fairy tale creatures outside his house (besides Donkey). He orders them all to leave, but don't go as they say they were sent there by Lord Farquaad.
So, Donkey and Shrek go to the kingdom of Duloc to confront Farquaad. When they meet him, Farquaad decided that in order for the fairy tale creatures to leave Shrek's swamp, they must rescue a princess (Fiona). So, Shrek and Donkey go to rescue the princess. While Shrek is looking for the princess, Donkey gets chased by a dragon who cornered him on a broken bridge. As the dragon was about to eat him, he smooth-talked her so he would not be eaten, but she fell in love with him and took him to her chambers, shaking her hips back and forth happily as she carries him away. She flirts with him persistently, even though Donkey doesn't show interest, it doesn't stop her. She then puckers her lips and proceeds to attempt to give donkey a smooch causing Donkey to freak out. But at that moment Shrek fell down and got his behind kissed instead. She tried to give chase but failed, if Donkey wouldn't have been rescued Dragon would have likely kept him there forever where she could have kissed him as much as she pleased. During the journey back to Duloc, Shrek stated that there was a donkey named Gabby, who was "small and annoying". This description fits Donkey himself, and the name "Gabby" possibly could be "Donkey".
On the way to Duloc, Shrek, Donkey, and Fiona got along well. Even though Donkey was separated from Dragon, he was reunited with her when Donkey, Dragon, and Shrek saved Fiona from marrying Farquaad, who is eaten by Dragon.
In the second film, Shrek and Fiona arrive at their swamp after their honeymoon, only to realize that Donkey had "babysat" their home. He had come because Dragon was all moody and vicious.
When Shrek and Fiona are invited to the kingdom of Far Far Away, Donkey accompanies them, but is extremely annoying all the way. He is excited to be in the palace. Shrek and Donkey go into the woods after the king had invited them for some father-son bonding with Shrek, and they meet a tabby cat named Puss in Boots. He says that he was hired by King Harold to kill Shrek, but he failed to do so. He pleaded for their forgiveness, but Donkey is upset when Shrek forgives him. At first, Donkey doesn't like Puss, but they eventually become the best of friends.
Puss accompanies Shrek and Donkey to find the Fairy Godmother's office and helps the duo steal a potion called "Happily Ever After". When he offered to sample the potion for Shrek, Donkey interrupted him, saying it was "the best friend's job" and drinks a small amount of the potion. Nothing happened to him, so Shrek drank the entire bottle.
Later that night, Donkey starts to reassure Shrek that everything will be all right, until he faints -- which Shrek also does shortly afterwards. Waking up the next day, Donkey realizes that he is now a stallion, and that Shrek is now a human. After stealing a proper outfit for Shrek, the trio make their way to the castle, but the Fairy Godmother and her son Prince Charming are already there and a heartbroken Shrek lets Fiona go and leaves the palace with Donkey and Puss.
They are later rescued by the Three Little Pigs, the Three Blind Mice, the Big Bad Wolf, Pinocchio, and Gingy after they were locked up for running away from the authorities. Donkey guided Mongo, a giant gingerbread man created by the Muffin Man, to the castle and helped to take away the Fairy Godmother's wand. At midnight, he, Shrek and Fiona are transformed back into their regular selves. Donkey is disappointed that he's not a horse anymore, but Shrek assures him, that he will always be a stallion.
At the party near the end of the movie, Donkey and Puss sing a duet of Livin' la Vida Loca over the cast credits.
At the end of the film, Donkey is reunited with Dragon, who is followed by their donkey/dragon-hybrid children, the Dronkeys, whom Donkey is happy to see.
In the third film, Donkey appears along with Puss to accompany Shrek along for the journey to find the new king of Far Far Away after King Harold dies in his lily pad.
Donkey has also named his kids after his favorite foods.
Donkey and Puss switch bodies because of a Merlin's transportation spell in the film (this was probably because when Merlin tried to cast the spell to send Shrek, Artie, Donkey and Puss back to Far, Far Away, both of them touched each other), but go back in their original bodies at the end.
Unlike Shrek's terrified fake happiness when Fiona announced her pregnancy to everyone, Donkey was thrilled over the prospect of becoming an "uncle". He is seen at the end of the film playing peek-a-boo with Fergus.
In the fourth film, in Rumpelstiltskin's universe, Donkey is afraid of Shrek and evil fairy tale creatures. Donkey also has messy fur in this universe. He was allowed to sing, but was forced to sing the songs that only the witches liked. This is one of many cruel jobs Donkey has been hired for, which also included a time working for Old MacDonald.
Grand Interdimensional War