He is mentioned briefly in the first Shrek film when Gingy and Lord Farquaad discuss their knowledge of him, speaking in the words of the nursery rhyme.
He first appears in Shrek 2, when Shrek and Gingy persuade him to bake an enormous gingerbread man named Mongo. Mongo helps the heroes to storm King Harold's castle during the Wedding Ball.
Shrek the Third
In Shrek the Third, the Muffin Man is revealed to be a father figure to Gingy, who calls him "Papa". As in the nursery rhyme, he lives on Dury Lane.
Shrek Forever After
He appears in Shrek Forever After as a baker on birthday party. In the reality in which Shrek wasn't born, Gingy is seen fighting Animal Crackers and the Muffin Man is seen as a bookie saying "Place your bets!" He also appears in the scene when Rumplestiltskin promises anyone's heart's desire if they give him Shrek.