Max worked for Prince Humperdinck's Father, the King. However, as the King grew older, and his son started taking over, Miracle Max was fired. This inspired a lifelong grudge against Humperdink that prompted Max to help Inigo Montoya and Fezzik revive the "Man in Black," or Westley, for very little monetary gain. He didn't revive Westley for a truly noble cause, though. It was Max's understanding that Westley would humiliate Humperdinck by stealing away Buttercup, which he did.
When presented with the "mostly dead" body of Westley, Miracle Max used a bellows to fill Westley's lungs with air. He then asked him what he had that was worth living for. When he pressed on Westley's chest, he responded "true love." Miracle Max pretended like he heard him say "to blave," which means "to bluff" and then accused Westley of cheating at cards. His wife Valerie then bursts in the room and shouts "liar!" She badgers him for not helping and reveals that Miracle Max had lost his confidence since he was fired by Humperdinck.