The tale of the ‘first samurai’ whose severed head still terrorises Tokyoites today is the story of the city itself

A Tokyo bank once opened an account in the name of a man who had been dead for 1,000 years.

The bank was a branch of Tokyo-Mitsubishi UFJ (now part of MUFG, the largest bank in Japan), which looked out over a neighbouring lot that contained the grave where the man was buried. The bank employees were reportedly instructed not to open any windows to the man’s grave, nor to turn their backs on it, even when at their desks; the account was set up to placate him.

The figure? Taira no Masakado, a rebellious warrior who was killed in 940AD but whose spirit has terrorised the region ever since. How Masakado became such a malevolent symbol to ordinary Tokyoites is the story of the city itself, and its centuries of violence, superstition and coincidence.

Q&A What is Guardian Tokyo week? Show Hide As Japan's capital enters a year in the spotlight, from the Rugby World up to the 2020 Olympics, Guardian Cities is spending a week reporting live from the largest megacity on Earth. Despite being the world's riskiest place – with 37 million people vulnerable to tsunami, flooding and due a potentially catastrophic earthquake – it is also one of the most resilient, both in its hi-tech design and its pragmatic social structure. Using manga, photography, film and a group of salarimen rappers, we'll hear from the locals how they feel about their famously impenetrable city finally embracing its global crown

At the time of Masakado’s death, the region now known as Tokyo was little more than mudflats and plains of high reeds. Japan was ruled from far-away Kyoto – literally “the Capital” – while the Tokyo area was the lawless north, the destination for younger sons, bastards and outcasts who were packed off to the frontier. These borderland warlords called themselves the samurai – “those who serve” – and boasted of their lifelong loyalty to the throne.

Mostly. Masakado was the first glimmering of a shift in power away from Kyoto and towards these new warriors. One day, announcing that the Sun Goddess had chosen him, he proclaimed himself emperor, killed a local governor and seized two northern provinces. Shocked by his treachery, the real emperor put a price on his head, which one of Masakado’s cousins soon collected. Dead or alive, however, the damage had been done: Masakado had challenged the sovereign’s divine authority.

Facebook Twitter Pinterest The site of Masakado’s grave, in Otemachi, Tokyo. Photograph: World Discovery/Alamy

It wasn’t long before the legends began. He was said to be invulnerable, except for the top of his head, where his mother – a serpent – had failed to lick him. Plagues of butterflies supposedly warned of his revolt as rainbows broke out simultaneously in the capital.

The authorities tried to mock him by claiming that he was speared by sword-leaf trees in the afterlife, his liver eternally roasting – but this propaganda only revealed the degree to which he’d rattled them.

His daughter, Takiyasha, was said to live on in the ruins of his fortress, dabbling in necromancy and raising an army of frogs. In Japanese, frog (kaeru) is a pun on “return”, a hint that Masakado would come back to seek his revenge.

To prevent that, the authorities cut off his head and brought it to Kyoto, where they hung it from a tree in the marketplace. But the severed head howled in the night, and demanded to know where its body was.

Eventually, the head flew away. A temple in Gifu marks the spot where a local warrior shot at it with an arrow, and then it was on the move again, eventually coming to rest in an obscure fishing village called Shibazaki. The locals washed it, buried it with full honours and inscribed the gravestone with charms that prevented his escape. But lighting strikes and strange apparitions continued – and whenever bad luck struck the village, it was inevitably blamed on him.

Facebook Twitter Pinterest Takiyasha the Witch and the Skeleton Spectre, an 1844 triptych of woodblock prints by Kuniyoshi Utagawa. It shows Takiyasha, daughter of Masakado, summoning a skeleton spectre. Photograph: Eileen Tweedy/Rex/Shutterstock

Meanwhile, Masakado’s infamy was starting to grow among the rebellious samurai bad boys, who had taken to quoting his scandalous maxim: “The people of this world will always anoint their sovereigns through victory in combat.”

Eventually those rebels seized power for themselves through victory in combat, and Masakado was anointed the “first samurai”. His grave, located at the Buddhist Kanda Shrine, was now officially incorporated within the new capital city: the great Edo, now the city of the Shogun.

The position of Shogun was never meant to be permanent. It was supposed to be a crisis appointment: a hatchet-man for the emperor during a national emergency. The canny Tokugawa family, however, twisted it into a dynasty, and from the 1600s they became the de facto rulers of Japan for the next 250 years. By 1720 Edo had become the largest city in the world and the true power centre of Japan – with Masakado as its shadowy patron.

Japan also deliberately cut itself off from other countries, while Edo became home to the “floating world”, an isolated enclave of artistic pursuits, advanced craft techniques and sometimes seedy nightlife. The popular kabuki theatres were censored from discussing politics, so instead the big-city audiences flocked to lurid tales of ancient vengeful spirits. Masakado (1836) was one of the hits, with his sorceress-daughter retelling his story and fighting off her pursuers with witchcraft.

Facebook Twitter Pinterest Masakado on horseback bowling over a foot-soldier, by Yoshitoshi, c 1883-1886. Photograph: John Stevenson/Corbis/Getty

But eventually Masakado’s people were themselves defeated. The samurai started to fade in relevance, and in 1868 a revolution overthrew the Shogun and “restored” the emperor. Edo was renamed To-kyoto (“Eastern Capital”), soon shortened to just Tokyo. Masakado’s grave wound up on the grounds of the new finance ministry.

Wary of his influence, in 1874 the new government officially proclaimed him an “enemy of the emperor”, ending his semi-divine status. Then the finance ministry burned to the ground in the 1923 earthquake. Masakado was blamed. Rumours then spread that the replacement building, too, was cursed: accidents, falls and mishaps claimed 14 lives in five years – including that of the finance minister himself.

Gingerly, officials confessed that they had bulldozed the grave during construction. After the death of the finance minister, they hastily restored the grave in 1928, and a priest was called in to hold a “pacification ceremony” – because it’s rude to say “exorcism”. They forgot, however, to put back the stone slab carved with spells to hold Masakado in check.

Chris Michael (@chrismichaelgdn) We went to pay our respects to Masakado's grave at Otemachi station, exit C4... only to find the curse in full effect #guardiantokyoweek pic.twitter.com/I1TvxbWp00

That, at least, was the excuse offered in 1940 when nine nearby offices were destroyed in a lightning strike. The stone was put back, only to enter the news again in 1945 when it got the blame for causing a bulldozer to overturn, killing the driver. The US Army Occupation force had planned to turn the area into a car park, but were persuaded after the accident that the best policy was to leave Masakado in peace.

The Mitsui Finance Corporation didn’t get the memo. Five decades later, with Japan mired in a two-decade recession, it tried to sell mineral mining rights to Masakado’s land – an act of hubris, perhaps, that signalled the desperation of Japan’s economic crash. As usual, Masakado had the last laugh: the company filed for bankruptcy in 2002. It was during that time that Tokyo-Mitsubishi bank, taking no chances, tried to bribe him in the afterlife by opening an account in his name.

Play Video 7:28 Looking for cheap rent? Try a haunted house – video

Masakado isn’t the only ghost in Tokyo. The victims of lethal experiments at Toyama Park are still reportedly heard, while so-called “stigmatised properties” or haunted houses can be rented for a major discount. Not even the prime minister is immune. Since 2012, Shinzo Abe has refused to move into his official residence in Nagatacho, where one of his predecessors was assassinated.

Masakado’s grave is still there today, among the skyscrapers and construction sites near exit C4 of Otemachi station, a little garden with a couple of trees, one last patch of green in the swish business district. It is a small, concrete square, set behind low walls topped with sculpted privet hedges. There, set on a triple-stepped plinth, is a slab of stone carved with ornate cursive Japanese and images of frogs. This is all that is left of Masakado’s resting place, a tiny scrap of the old world, nestled within the cracks of the new.

Jonathan Clements is the author of An Armchair Traveller’s History of Tokyo

Guardian Cities is live in Tokyo for a special week of in-depth reporting. Share your experiences of the city in the comments below, on Twitter, Facebook and Instagram using #GuardianTokyo, or via email to cities@theguardian.com