This is not a survival technique.
The way to determine how many calories is in a particular food item is to measure the amount of heat energy emitted when an item is burned. Anything burned to ash is basically calorie free as far as food value goes.
Ash is composed of whatever was unable to vaporize into smoke in a fire. The hotter the fire, the more material burns. Wood ash has a lot of calcium carbonate and potash (potassium salts) (~35-55%). Traces of metals in the wood will be concentrated in the ash, because it takes a very hot fire to vaporize them. Wood ash can be used to fertilize plants, but not people. It probably wouldn't poison you, and you might get a few trace elements (or some heavy metal poisoning, if the ashes were concentrating some of that).
This is the sort of desperate measure you can try when you are starving to death, and are willing to try anything, even stuff that rationally, you know won't help. I'd expect it to stave off starvation about as well as eating dirt: there might be some questionable, miniscule benefit, but don't plan on it as a technique to live longer.