The story begins with a prologue set in late 1960s Japan. A group of tanuki is threatened by a gigantic and ongoing suburban development project called New Tama, in the Tama Hills on the outskirts of Tokyo. The development is cutting into their forest habitat and dividing their land.
As construction continues, the story resumes in early 1990s Japan, during the early years of the Heisei era. With the amount of living space and food decreasing every year, the tanuki begin fighting among themselves for the diminishing resources of their habitat until at the urging of the matriarch Oroku ("Old Fireball"), they decide to unify against the humans to stop the development.
Several prominent tanuki lead the resistance, including the aggressive chief Gonta, the old guru Tsurugame, the wise-woman Oroku, and the young and resourceful Shoukichi. Using their illusion skills (which they must try to re-learn after having mostly lost and forgotten them), they stage a number of diversions including repeated attempts at industrial sabotage. These attacks injure and even kill some people, frightening many construction workers into quitting their jobs, but more workers immediately replace the ones who've been scared away. In desperation, the tanuki send out messengers to seek the help of various legendary elders from faraway regions, while continuing their resistance at home.
After several years, one of the messengers returns bringing a trio of tanuki elders from the distant island of Shikoku where development is much less of a problem and (or perhaps because) the tanuki are still worshipped more actively. In an all-out effort at re-establishing respect for the supernatural, the entire group stages a massive "ghost parade" to make the human residents think the growing town is haunted. The strain of the massive illusion kills one of the elders, and the effort seems wasted when the owner of a nearby theme park falsely takes credit for the parade, claiming it was all just a publicity stunt.
With this tremendous setback, the unity of the tanuki finally fails and they break up into smaller groups, each following a different strategy. One group led by Gonta takes the route of eco-terrorism, holding off workers for a time until they are eventually wiped out in a pitched battle with the police. Another group of tanuki including Tsurugame and Oroku desperately attempt an option that was previously unthinkable; they arrange for television coverage and publicly reveal themselves to the media to plead their case against the destruction of their habitat. One of the two surviving elders becomes senile and starts a cult among some of the tanuki who are unable to transform, eventually sailing away with them in a treasure-ship that takes them all to their deaths, while the other elder investigates the possibility of joining the human world as the last of the transforming kitsune (foxes) have already done.
When all efforts fail, in a last moving act of defiance, the remaining tanuki stage one last grand illusion, temporarily transforming the urbanized land back into its pristine state to remind everyone (including themselves) of exactly what has been lost. Finally, their strength exhausted, the tanuki most trained in illusion are left with no choice but to follow the example of the kitsune: they blend into human society one by one, abandoning those who can't transform.
While the media appeal comes too late to stop the construction, the public responds sympathetically to the tanuki, pushing the developers set aside some areas as parks. However, the parks are too small to accommodate all of the non-transforming tanuki; some of them try to survive there, dodging traffic to scrounge through human scraps for food, while others disperse farther out to the countryside to compete with the tanuki who are already established in those areas.
In a touching coda to the story, one day Shoukichi, who also joined the human world, is coming home from work when he sees a non-transformed tanuki leaping into a gap in a wall. Shoukichi crawls into the gap and follows the path, which leads to a grassy clearing where some of his former companions are gathering. He joyfully transforms back into a tanuki to join them. In an emotional final scene, Shoukichi's friend, Ponkichi (pictured below) addresses the viewer, asking humans to be more considerate of tanuki and other animals less endowed with transformation skills, and not to destroy their living space; as the camera pulls out and away, their surroundings are revealed as a golf course surrounded by suburban sprawl.