In the shadow of the pine gardens of Honmaru at the shōgun’s castle in Edo, there existed an institution about which the official chronicles remained silent. Oniwaban (御庭番) – “garden guards” – did not, in fact, watch over flowers and shrubs. They were the eyes and ears of the shōgun, a secret intelligence network whose reports could halt a rebellion, depose an official, and at times even save the entire system of power. It was precisely within this atmosphere of everyday life – where discreet glances and seemingly trivial conversations carried the weight of political destiny – that one of the most fascinating tales of the Edo period was born.
They were not the ninja of cinematic legend – assassins leaping across rooftops, armed with shuriken. Instead of illusions and poisons, they possessed penetrating gazes; instead of swordsmanship, they relied on deep psychological insight to detect falsehoods, hidden intentions, and the weaknesses of others. Their weapons were words, observation, and discipline. They had access to the innermost corners of the castle, monitored every step of the craftsmen admitted into Honmaru, and their reports did not vanish into anonymous archives but went directly into the hands of the shōgun himself. Their missions in the provinces – secretive, prolonged, requiring the art of blending into the crowd – were dryly described in official language as “distant affairs” (遠国御用), yet upon their contents rested the question of whether Tokugawa peace would last another decade.
Today they survive only as legend and myth, far removed from the reality of Edo. In kabuki plays and modern anime they appear as “super-ninja,” while in truth they were refined bureaucrats of an age of peace, whose aura of secrecy only fueled the imagination. This is the story of men who stood in the shadows, who did not seek glory on the battlefield but, through quiet labor in the gardens of Edo Castle and keen observation in the provinces, helped maintain the order of the Tokugawa world for more than two centuries. Their story is not spectacular – and for that very reason it deeply reminds us that empires endure not through the blood of heroes, but through an invisible web of words, glances, and reports.
Life had only just begun in the Honmaru courtyard. The scrape of bamboo twig brooms echoed across the gravel paths, while dew upon the moss glittered in the first rays of sunlight. It seemed an ordinary morning at Edo Castle – gardeners bent over azalea bushes, guards changed shifts at the gates, kitchens prepared meals for hundreds of the shōgun’s retainers. And yet, in the shadow of a pine tree, just beside the garden pavilion, someone stirred – a figure who, at first glance, appeared to be just another among the broad ranks of servants.
He wore simple clothing, his face calm and unremarkable. In his hand he carried a folded document hidden within a tatōgami. He did not pause, did not ostentatiously look around, did not run. His steps were quiet, almost ritualistic, as though merged into the rhythm of the morning. Only the initiated knew that this man was not heading for a storeroom or a garden arbor, but directly toward the chamber where the eighth shōgun – Tokugawa Yoshimune – resided.
This was the daily reality of the Oniwaban (御庭番) – the “garden guards,” who in truth were the eyes and ears of the shōgun. Officially, they belonged to the castle’s service staff and performed duties as guards at the gardens; thus their presence near the private chambers aroused no suspicion. In practice, however, their task was to deliver information: about the mood in Edo, about the intrigues of the daimyō, about what was whispered in teahouses at Nihonbashi or at the bustling marketplaces of Asakusa.
They were not assassins in black garb nor masters of poisons – though later kabuki plays and jidaigeki dramas portrayed them so. The Oniwaban more closely resembled discreet investigative clerks, men who, behind the mask of daily routine, concealed the mission of preserving the delicate balance of the Edo period. Their reports, carefully written and often checked by clan elders, landed directly on Yoshimune’s desk, bypassing the complex bureaucratic hierarchy. This made them unique – though of low rank, they could speak with a voice that reached the highest power.
Thus, in the silence of the garden, politics was born. Behind the rustle of swept gravel lay the secrets of an entire country, and the seemingly ordinary “gardeners” in reality ensured that Tokugawa peace did not collapse under the weight of conspiracies and ambitions.
Even the very name of this mysterious institution carries a play of appearances so typical of the Edo period. Oniwaban (御庭番), in simple translation “garden guards,” sounds innocent, almost idyllic. It seems to denote people watching over the gates of pavilions or maintaining order along gravel paths. Yet within this light-sounding term lies the key to one of Japan’s most intriguing intelligence formations (for other intelligence networks, known as shinobi, ninja, and by many other names, read here: Ninja Are Not Just Iga and Kōga – Discover 10 Shinobi Clans from Different Eras and Regions).
Breaking down the name into its kanji reveals its subtlety. The first, 御 (o-), is an honorific prefix. In Japanese it served to emphasize status and respect toward what it described. In the case of Oniwaban, it signified that these were no ordinary guards, but men directly under the shōgun’s patronage, acting in the name and shadow of his authority.
The second character, 庭 (niwa), means “garden” or “courtyard.” It is a symbolic space: on one hand, a place of harmony, where Edo Castle blossomed with cherry and azalea, and on the other, the location of the Oniwabansho quarters themselves, situated beside the gardens within Honmaru, the most important, central part of the castle. This geographical and topographical detail gave the formation its seemingly modest name.
The third character, 番 (ban), is a military-administrative term meaning guard, watch, or shift. It appears in many other contexts, such as hyakunin-ban (百人番) – the “hundred-man guard” serving at the castle. The inclusion of this character in the name made the Oniwaban part of the official protective structure of the shogunate, though their true role extended far beyond “watching the garden.”
The very pronunciation and usage of the name are also interesting. Both forms Oniwaban and Niwaban are encountered. The former, with the o- prefix, is more formal and indicates the official, courtly character of the function. The latter, simplified, was used colloquially and could appear in sources or literature where strict etiquette was not always observed. Both variants are correct, but each carries a different nuance: Oniwaban as the formal, dignified form; Niwaban as the more everyday, abbreviated version.
It is also worth stressing that the choice of such a “gentle” designation was not accidental. The name sounded calm, neutral, not suggestive of secret operations or espionage. Thanks to this, the Oniwaban could exist at the very heart of the castle, in a place where everything seemed bright and orderly, and yet their task was to extract whispered intrigues, discreetly track sentiments, and investigate hidden threats. In a garden that, by definition, was meant to symbolize harmony, there were thus placed silent guardians of that harmony – both literal and political.
Seventeenth-century Japan was like a theatre in which the curtain had fallen after the bloody acts of the Sengoku wars, and upon the stage appeared a new director – the Tokugawa clan. After generations of fratricidal battles, betrayals, and the burning of entire provinces, in 1603 Tokugawa Ieyasu assumed the title of shōgun and began an age of peace that we now call the Edo period. This peace, though golden compared with the chaos of civil war, was not a natural tranquility – it required constant oversight, discipline, and control, like a beautiful garden that must be pruned each day lest it become overrun with weeds.
The Tokugawa system of rule was built upon intricate political mechanisms. The most famous of these was sankin-kōtai (参勤交代) – the obligation of the daimyō, the feudal lords of the provinces, to spend every other year in Edo, leaving their families behind as hostages (more on this here: What to Do with a Society of Samurai Who Only Know War and Death in Times of Peace? - The Clever Ideas of the Tokugawa Shoguns). This rhythmic migration of lords and their retinues filled the capital with life, while at the same time draining the purses of the mighty, who instead of arming themselves were forced to spend fortunes on journeys and residences in Edo. Added to this was the network of routes such as the Tōkaidō, and hundreds of checkpoints that ensured no one transported weapons or assembled hidden armies.
The Tokugawa also created a vast bureaucracy: inspectors known as Ōmetsuke (大目付) who watched over the daimyō themselves, Metsuke (目付) officials who spied on lower vassals, and crowds of minor functionaries who ensured that the great city of Edo – a metropolis of more than a million residents – did not collapse into chaos. Yet the more developed this machine became, the more it resembled a mechanism of gears turning to the rhythm of ceremony and convention rather than genuine control. Reports began to arrive late, and inspections grew superficial. The shōgun therefore needed people who would tell him the truth unembellished by ritual.
Onto the stage stepped Tokugawa Yoshimune (1684–1751), the eighth shōgun, who assumed power in 1716. Yoshimune came from a collateral branch of the clan – the Kii domain – and arrived in Edo as an outsider, without a family base in the heart of the capital. This made him both more cautious and more determined to build his own network of loyalty. It quickly became clear that he needed new eyes and ears – men who would not depend on the ossified hierarchy but would report directly to him.
Yoshimune’s era was marked by reforms known as Kyōhō no kaikaku (享保の改革) – attempts to rescue state finances, streamline administration, and maintain order in the face of economic crises and natural disasters. These reforms required not only new taxes and regulations, but also reliable information. For how could one govern an enormous country stretching across thousands of islands without knowing the true sentiments in the provinces and on the streets of Edo?
It was then that Yoshimune decided to create the Oniwaban – a small but extraordinary group of agents who would provide him with first-hand reports. They were trusted men, brought with him from the days when Yoshimune ruled in Kii, former kusurigomeyaku (薬込役) – “handlers of gunpowder” or “officials of medicines,” who under that cover had already performed intelligence duties within their domain. Now they were to become a new informational channel for the shogunate.
Their emergence also signaled a shift in the landscape of Japan’s former “spies.” The Iga-mono and Kōga-mono – descendants of the old shinobi who in the sixteenth century had truly conducted sabotage, reconnaissance, and guerrilla operations – were, in the age of peace, reduced to the role of ordinary guards and catchers of criminals (see here: Ninja in Retirement - What Happened to Shinobi During the Peaceful Edo Period?). They were no longer useful as political agents. Yoshimune, unwilling to rely on ossified tradition, preferred instead to trust his own men, who owed everything solely to him.
Thus was born an institution that took its name from the garden but in truth held the whole of Japan within its purview. In an age when all seemed predictable and serene, when the shogunate blossomed like a carefully tended niwa, Yoshimune knew one thing – even in the most perfect garden one must keep watch, for in the shadows weeds may sprout. The Oniwaban were those who were to perceive them before anyone else noticed that something was slipping out of control.
When in 1716 Tokugawa Yoshimune crossed the gates of Edo Castle as the new shōgun, he was not a ruler native to the capital. He hailed from a collateral line of the Tokugawa – from the Kii domain, stretching across what is today Wakayama Prefecture. There, in the shadow of the Kii mountains and on the shores of the Pacific, he had shaped his administration and surrounded himself with men he trusted. Among them were peculiar officials known as kusurigomeyaku (薬込役). The name of their function pointed to duties related to gunpowder and medicines – fields that required discipline, precision, and responsibility. Yet beneath this guise lay another mission – oversight, inspection, and the gathering of information within the domain itself. It was these quiet, observant men who became the foundation of the new institution Yoshimune established in Edo.
When he assumed rule over the entire country, he could not rely fully on the complicated bureaucratic network inherited from his predecessors. He needed his own men – loyal only to him, unentangled in court intrigues and old alliances. Thus, in the first year of his reign, he brought to Edo a small group, barely a dozen of his former kusurigomeyaku, and installed them in a new role – Oniwaban. Historical sources note that at first there were twelve of them, but soon the number stabilized at seventeen families, which became the core of this unique formation.
Each of these families received the hereditary right to serve as Oniwaban. The function was passed from father to son, which in Japan’s bureaucratic-military world was common practice, but in this case strategically invaluable. Thanks to it, the formation remained hermetic and resistant to infiltration. Those who began as gokenin (御家人) – lower-ranking vassals – in time advanced to the status of hatamoto (旗本), direct vassals of the shōgun with the privilege of personal access to the ruler.
Some names have survived in the sources as examples of careers built upon this foundation of service. Kawamura Osamu (川村修就), initially one of the Oniwaban, later became the first magistrate of Niigata and Nagasaki – cities of strategic importance for trade and foreign relations. Muragaki Norimasa (村垣範正), also from the Oniwaban, rose to the position of finance magistrate and later participated as deputy envoy in negotiations with the Americans during the opening of Japan to the world. These examples show that a modest beginning in the “garden guard” could become a springboard to a distinguished career in state administration.
Why, then, did Yoshimune not rely on the “traditional” Iga-mono or Kōga-mono – descendants of the old shinobi whom even Tokugawa Ieyasu had once employed as guards and scouts? The answer lies in the change of the age. Those who in the sixteenth century were masters of assassination, sabotage, and covert raids had, in the stable world of Edo, become mere guards and okappiki – city detectives chasing criminals. Their old skills were anachronistic in times of peace, and the very name “ninja” aroused fear and suspicion rather than trust. Yoshimune wanted an institution that was new, discreet, tied only to him and his reforms, and not to the mythical past of the bloody Sengoku wars.
Thus emerged an organization composed of seventeen families that exerted an immense influence upon the political fabric of Japan. Their quarters – the Oniwabansho – were located within Edo Castle, beside the gardens of Honmaru. From there extended a network of men who travelled in disguise through the provinces, eavesdropped in markets, observed embassies, and reported on everything that might threaten the stability of the shogunate.
The seventeen families of the Oniwaban were like seventeen discreet pupils through which Yoshimune gazed upon Japan. It was thanks to them that the shōgun – a solitary ruler standing at the peak of the hierarchy – gained access to the truth that neither elaborate ceremonies nor official reports filled with polite phrases could provide. The Oniwaban became not merely guardians of the garden, but guardians of information – the most precious resource of the Tokugawa age of peace.
Within the vast administrative machine of Edo, which over time took on an almost Byzantine scale, there were three pairs of eyes through which the shōgun looked upon his country. Each had a different focal length, a different field of view—from the wide panorama of the elites, through the oversight of everyday life, down to the quiet whispers in the gardens of Honmaru.
Highest in this hierarchy stood the Ōmetsuke (大目付)—literally “great inspectors.” These were high-ranking officials tasked with watching over the most powerful: the daimyō, the great houses, and even the shogunate’s own officials. It was they who were to ensure that mighty vassals did not conspire against Edo, that sankin-kōtai proceeded according to the rules, and that excessive stores of weapons were not being amassed. Over time, however, the office ossified: the ōmetsuke increasingly concerned themselves with ceremonies, diplomatic missions, and formalities rather than genuine surveillance.
Below them were the Metsuke (目付)—“those who look.” They monitored lesser matters: lower-ranking samurai, townspeople, and mid-level officials. They were the eyes of the shogunate in the everyday life of Edo—keeping order, ensuring that class rules were observed, and that social boundaries did not blur. One could say the ōmetsuke looked upward, while the metsuke looked downward.
And where, in all this, were the Oniwaban (御庭番)? Formally, their rank was modest—many began as gokenin, only later advancing to hatamoto. In theory they were subordinate to the junior elders, the wakadoshiyori (若年寄). Yet practice made them something far more consequential. The Oniwaban had a direct reporting line to the shōgun. Even as men of low status, they could stand before Yoshimune and deliver a report—something for which the ōmetsuke or metsuke often had no chance without the mediation of the entire hierarchy.
This exceptional relationship meant that although the Oniwaban were neither as numerous nor as officially powerful as other inspectors, their words could resonate far more strongly. They were like a narrow channel bringing fresh water straight to the very source of power—unseen from the outside, yet vital to preserving balance. This made their presence within Edo’s structure disproportionately important: lower in rank, yet with real influence over top-level policy.
The daily life of the Oniwaban had two faces—one overt, the other hidden—yet both interwoven with the rhythm of Edo Castle. On the surface, they were “garden guards”: they maintained order in Honmaru, controlled who entered and exited the palace interiors, vetted craftsmen hired to repair bridges or tatami, performers invited to appear in the Ōoku, and even fencing masters teaching young samurai. Anyone who crossed the palace gates passed under their watchful gaze—they did not search for swords so much as for intentions. Notes from the period mention that their work sometimes resembled that of modern security officials more than that of mythical warriors of the shadows. Their “garden” was in truth the space where the shogunate’s politics blossomed, and they ensured that no weed of conspiracy took root too near the shōgun himself.
The second face of their service began when the Oniwaban left the castle. This was the discreet observation of the city and the provinces, sometimes called “distant affairs”—engoku goyō (遠国御用). Officially, an official might be recorded in documents as “absent due to illness,” while in reality, in disguise, he journeyed to Kyoto, Osaka, or farther afield to investigate events in the domains. Before such a departure, an Oniwaban did not act alone—he consulted the elders of his family line, drew upon the experience of senior colleagues, and prepared a mission plan. Already in Edo he would gather preliminary information, learn the names of officials, local tensions, and sometimes the full genealogies of daimyō families.
The journey was not an adventure out of ninja tales, but a painstaking assignment. An Oniwaban would pose as a merchant, a pilgrim, or an official on the road—nothing spectacular, rather a plainness that drew no attention. In cities such as Kyoto and Osaka he could rely on a network of trusted merchants and townspeople who secretly supported the shogunate’s intelligence: helping to find lodging, providing information on rice prices, on new trends in kabuki theater, or on rumors concerning the daimyō. It was precisely in such small particulars that the politics of Japan pulsed—rice prices could portend a peasant uprising, and an inconspicuous kabuki production might conceal satire aimed at the authorities.
The report an Oniwaban brought back from such a mission took the form of a fūbunsho (風聞書)—a written record of news, opinions, and observations. It did not land immediately on the shōgun’s desk. First, the family elders reviewed it, polished the style, and verified facts to avoid embarrassment. Only then did the report reach the O-soba goyō toritsugi (御側御用取次—the intermediary between the court and the shōgun) or the ruler directly. Here lay the strength of the Oniwaban—their words, though uttered by men of lower rank, could touch the very heart of politics and influence decisions made in Edo.
Thus their everyday life was not a series of spectacular duels, but the quiet rhythm of observation, notes, and conversations overheard at the market. One day they might check whether a carpenter bringing lumber into the palace was smuggling a hidden letter; another day they might pose as travelers to catch, in a mountain inn, a rumor about an indebted daimyō. The Oniwaban lived in a world where information was a weapon more lethal than the sword, and loyalty to the shōgun the only shield protecting them from the wrath of the powerful.
The world of the Oniwaban had nothing to do with the flash of shuriken or acrobatic tricks we know from novels and films. Their weapons were observation, memory, and discretion—three virtues that allowed them to survive within the dense social fabric of Edo. In a city of hundreds of thousands, where every step echoed through the marketplace and every whisper could be caught in a teahouse, the Oniwaban had to be masters of the art of “social eavesdropping.” They listened to merchants talk about rice prices, to samurai wives speak of mounting debts, and even to kabuki actors, whose satirical performances often hid political allusions.
Their daily work consisted in skillfully slipping between worlds. They had to know protocol and etiquette—in the shōgun’s palace they employed full ceremony; in the pleasure quarters of Yoshiwara they could don the mask of a wealthy patron; and in the provinces they masqueraded as ordinary wayfarers. This masking of status was their greatest craft: neither too humble as to invite pity, nor too proud as to draw attention. Blended into the crowd, unnoticed, and yet constantly present.
The rules of their service also required far-reaching isolation. Regulations forbade overly close contacts with people outside their own group. Even in private life, marriages were often contracted solely within Oniwaban families, in order to preserve secrets and prevent any “leak” of information. The profession of spy thus became the lot of an entire family—the children were born already in the shadow of that service, and their futures were predetermined.
As we have also noted, the Oniwaban were not only the shōgun’s “eyes and ears,” but a training ground for future bureaucrats and diplomats. Their experience in discreetly gathering information, analyzing rumors, and observing social moods made them exceptionally valuable when Japan faced new challenges—from Yoshimune’s internal reforms to negotiations with the Western powers.
The history of the Oniwaban ends in the shadow of a legend that often obscures their true image. In jidaigeki theatre, in manga and anime, they appear as the shōgun’s “super-ninja”—figures endowed with superhuman abilities, masters of combat, assassins, and acrobats. This simplification arises from several sources: the similarity of the name “Iga-mono” to that of the old castle guards, the hereditary character of their service, and above all the aura of secrecy that surrounded them for a century and a half. An audience, lacking access to the real reports and registers, easily succumbed to the illusion that these discreet officials must have been the reincarnation of the old shinobi.
On the theatrical stage, the Oniwaban often stood alongside the romanticized ninja of Iga and Kōga—in kabuki dramas and later films they became almost indistinguishable. Modern productions continue this image: masked warriors of the Edo gardens, ready at any moment for a midnight attack. It is a myth, but not an accidental one—for although in reality the Oniwaban carried out rather painstaking administrative and intelligence work, their exceptional position within the shogunate’s structure, their closeness to the shōgun, and their complete discretion made them ideal material for the collective imagination.
Their actual history ended with the fall of the Tokugawa and the modernization of Japan in the latter half of the nineteenth century (more about those times here: The Tokugawa Shōgunate After the Fall of Samurai Japan – How They Survived the 20th Century and What They Do Today?). The opening of the country, the development of a modern police force and administration made the missions of discreet inspectors unnecessary. The Oniwaban families dispersed into society; many of their members found employment in the new Meiji offices, others chose careers in the army or diplomacy.
What remained were archival traces—reports, registers, memoirs—but also literature and modern scholarship, such as the works of historian Fukai Masami, which allow us to distinguish legend from document. Thanks to these we can now understand that the Oniwaban were one of the key elements of the Tokugawa system, maintaining the fragile balance of Edo peace. Not through weapons, but through words, information, carefully gathered and cautiously edited reports.
Their legacy, then, does not lie in tales of masked warriors, but in the reflection upon how great a weight the control of information carries in a state that, for more than 250 years, managed—though with many difficulties—to avoid civil war. In the gardens of Edo Castle, the Oniwaban guarded not so much the trees and ponds as the very order of the Tokugawa world.
>> SEE ALSO SIMILAR ARTICLES:
Encoding the Wind – Secret Communication Techniques of Ninja Schools During the Sengoku Wars
Iga Province: The Independent Ninja Republic and People's Commune in the Era of the Samurai
未開 ソビエライ
An enthusiast of Asian culture with a deep appreciation for the diverse philosophies of the world. By education, a psychologist and philologist specializing in Korean studies. At heart, a programmer (primarily for Android) and a passionate technology enthusiast, as well as a practitioner of Zen and mono no aware. In moments of tranquility, adheres to a disciplined lifestyle, firmly believing that perseverance, continuous personal growth, and dedication to one's passions are the wisest paths in life. Author of the book "Strong Women of Japan" (>>see more)
"The most powerful force in the universe is compound interest." - Albert Einstein (probably)
未開 ソビエライ
An enthusiast of Asian culture with a deep appreciation for the diverse philosophies of the world. By education, a psychologist and philologist specializing in Korean studies. At heart, a programmer (primarily for Android) and a passionate technology enthusiast, as well as a practitioner of Zen and mono no aware. In moments of tranquility, adheres to a disciplined lifestyle, firmly believing that perseverance, continuous personal growth, and dedication to one's passions are the wisest paths in life. Author of the book "Strong Women of Japan" (>>see more)
"The most powerful force in the universe is compound interest." - Albert Einstein (probably)
___________________
Would you like to share your thoughts or feedback about our website or app? Leave us a message, and we’ll get back to you quickly. We value your perspective!