Paul Gabrielsen explores the medical history of maggots:

Physicians in Napoleon’s army used the larvae to clean wounds. In World War I, American surgeon William Baer noticed that soldiers with maggot-infested gashes didn’t have the expected infection or swelling seen in other patients. The rise of penicillin in the 1940s made clinical maggots less useful, but they bounced back in the 1990s when antibiotic-resistant bacteria created a new demand for alternative treatments. In 2004, the U.S. Food and Drug Administration approved maggot therapy as a prescription treatment.

A recent study investigated the healing properties of maggot secretions, documenting how they limit the host body's inflammatory response:

It’s not surprising that maggot secretions would suppress the immune system, [researcher Gwendolyn] Cazander says. Otherwise, the larvae would probably be attacked by the body. She says she hasn’t yet seen such a reaction, even in patients treated with maggots for more than a year. Cazander’s team is now working to isolate the complement-inhibiting compounds. A clinical drug featuring maggot secretions may be several years away—but if you can’t wait, the maggots themselves are available now.