Sokushinbutsu (即身仏) were Buddhist monks or priests who caused their own deaths in a way that resulted in their mummification. This practice reportedly took place almost exclusively in northern Japan around Yamagata Prefecture. It is believed that many hundreds of monks tried, but only 24 such mummifications have been discovered to date.
Today, the practice is not advocated or practiced by any Buddhist sect, and is in fact banned in Japan.
For 1,000 days the priests would eat a special diet consisting only of nuts and seeds, while taking part in a regimen of rigorous physical activity that stripped them of their body fat. They then ate only bark and roots for another thousand days and began drinking a poisonous tea made from the sap of the Urushi tree, normally used to lacquer bowls.
This caused vomiting and a rapid loss of bodily fluids, and most importantly, it made the body too poisonous to be eaten by maggots. Finally, a self-mummifying monk would lock himself in a stone tomb barely larger than his body, where he would not move from the lotus position. His only connection to the outside world was an air tube and a bell. Each day he rang a bell to let those outside know that he was still alive.
When the bell stopped ringing, the tube was removed and the tomb sealed. After the tomb was sealed, the other monks in the temple would wait another 1,000 days, and open the tomb to see if the mummification was successful.
If the monk had been successfully mummified, he or she was immediately seen as a Buddha and put in the temple for viewing. Usually, though, there was just a decomposed body. Although they were not viewed as a true Buddha if they were not mummified, they were still admired and revered for their dedication and spirit.
As to the origin of this practice, there is a common suggestion that Shingon school founder Kukai brought this practice from Tang China as part of secret tantric practices he learned, and that were later lost in China.
The practice was satirized in the story “The Destiny That Spanned Two Lifetimes” by Ueda Akinari, in which such a monk was found centuries later and resuscitated. The story appears in the collection Harusame Monogatari.