Restoring the function of the organ - which helps control blood sugar levels - reversed symptoms of diabetes in animal experiments.
The study, published in the journal Cell, says the diet reboots the body.
Experts said the findings were "potentially very exciting" as they could become a new treatment for the disease.
People are advised not to try this without medical advice.
In the experiments, mice were put on a modified form of the "fasting-mimicking diet".