You're talking about the Miracle of Calanda, the healing of Miguel Juan Pellicer, which has been discussed elsewhere on this forum.
Among the other highlights of this "miraculous healing", Pellicer claimed that his leg was extremely gangrenous upon his arrival at Zaragoza, more than 50 days after his accident. This is so improbable that it isn't even worth considering; gangrene in a severe injury sets in within 3-5 days, and you die from sepsis no more than a few days after that. If Pellicer's injury had been so severe as to require amputation, it would have been done either at Castellon, where his injury took place, or at Valenica, where he spend several days being treated upon his arrival from Castellon, more than 60 kilometers distant.
Most likely, the man decided to claim that his leg had been amputated after he discovered that begging was easier with a missing leg rather than a broken one, and only claimed that it had been healed when his ruse was discovered. This 'miracle' doesn't require a miraculous explanation in the first place, no matter what Catholic officials at the time said.