The publication history of Anarky, a character appearing in books published by DC Comics, spans various story arcs and comic book series. Co-created by Alan Grant and Norm Breyfogle, he first appeared in Detective Comics #608 (Nov. 1989), as an adversary of Batman. Introduced as Lonnie Machin, a child prodigy with knowledge of radical philosophy and driven to overthrow governments to improve social conditions, stories revolving around Anarky often focus on political and philosophical themes. The character, who is named after the philosophy of anarchism, primarily espouses anti-statism. Multiple social issues have been addressed whenever the character has appeared in print, including environmentalism, antimilitarism, economic exploitation, and political corruption. Inspired by multiple sources, early stories featuring the character often included homages to political and philosophical books, and referenced anarchist philosophers and theorists. The inspiration for the creation of the character and its early development was based in Grant's personal interest in anti-authoritarian philosophy and politics. However, when Grant himself transitioned to the philosophy of Neo-Tech, he shifted the focus of Anarky from a vehicle for socialist and populist philosophy, to rationalist, atheist, and free market-based thought.

Originally intended to only be used in the debut story in which he appeared, Grant decided to continue using Anarky as a sporadically recurring character throughout the early 1990s, following positive reception by readers and Dennis O'Neil. The character experienced a brief surge in media exposure during the late 1990s, beginning when Norm Breyfogle convinced Grant to produce a limited series based on the character. The 1997 spin-off series, Anarky, was received with positive reviews and sales, and later declared by Grant to be among his "career highlights". Batman: Anarky, a trade paperback collection of stories featuring the character, soon followed. This popular acclaim culminated, however, in a financially and critically unsuccessful ongoing solo series. The 1999 Anarky series, in which even Grant has expressed his distaste, was quickly cancelled after eight issues, but not before sparking a minor controversy by suggesting Anarky was the biological son of the Joker.

Following the cancellation of the Anarky series, and Grant's departure from DC Comics, Anarky experienced a prolonged period of absence from DC publications, despite professional and fan interest in his return. This period of obscurity lasted approximately ten years, with three brief interruptions for minor cameo appearances in 2000, 2001, and 2005. In 2008, Anarky reappeared in an issue of Robin authored by Fabian Nicieza, with the intention of ending this period of obscurity. The storyline drastically altered the character's presentation, prompting a series of responses by Nicieza. Anarky became a recurring character in issues of Red Robin, authored by Nicieza, which was cancelled in 2011.

In 2013 a revamped version of Anarky was debuted as the primary antagonist for Beware the Batman, a Batman animated series produced by Warner Bros. Animation. Later that year, the character made his video game debut in Batman: Arkham Origins, as an anti-villain who attempts to ally with Batman against corruption in Gotham City, while threatening government and corporate institutions with destruction.

Publication history 1989–1996: Creation and early depictions

Originally inspired by his personal political leanings, Alan Grant entertained the idea of interjecting anarchist philosophy into Batman comic books. In an attempt to emulate the success of Chopper, a rebellious youth in Judge Dredd, he conceptualized a character as a twelve-year-old anarchist vigilante, who readers would sympathize with despite the character's harsh methods. Creating the character without any consultation from his partner, illustrator Norm Breyfogle, his only instructions to Breyfogle were that Anarky be designed as a cross between V and the Black Spy from Mad magazine's Spy vs. Spy. Grant also briefly considered incorporating Krazy Kat as a third design suggestion, but decided against the idea. In response to deadline pressures, and not recognizing the character's potential, Breyfogle "made no preliminary sketches, simply draping him in long red sheets". The character was also intended to wear a costume that disguised his youth, and so was fitted with a crude "head extender" that elongated his neck, creating a jarring appearance. While both of these design elements have since been dropped, more enduring aspects of the character have been his golden face mask, "priestly" hat, and his golden sceptre.

The first Anarky story, "Anarky in Gotham City Part 1: Letters to the Editor", appeared in Detective Comics #608 (Nov. 1989). Lonnie Machin is introduced as "Anarky" as early as his first appearance in Detective Comics #608, withholding his origin story for a later point. He is established as an uncommonly philosophical and intelligent 12-year-old. The debut story of the character failed to provide a back story to explain his behavior, but a narrative from Batman reveals that he is a socially conscious and arrogant child who believes he knows how to solve societies' problems. Convinced that only he can do so, he becomes a vigilante and fashions weapons—a stun baton and smoke bombs—in labs at school. Lonnie Machin made his debut as "Anarky" by responding to complaints in the newspaper by attacking the offending sources, such as the owner of a factory whose byproduct waste is polluting local river water. He goes to lengths to disguise his age and appearance by creating a costume with a false head to increase his height. This was in fact intended as a ruse on the part of writer Alan Grant to disguise the character's true identity, and to confuse the reader into believing Anarky to be an adult. Anarky and Batman ultimately come to blows, and during their brief fight, Batman deduces that Anarky is actually a young child. During this first confrontation, Anarky is aided by a band of homeless men, including Legs, a homeless cripple who becomes loyal to him and would assist him in later appearances. After being caught, Lonnie is locked away in a juvenile detention center.

In Grant's earliest script for the character, Anarky was designed to be far more vicious, and to have killed his first victim. Dennis O'Neil, then editor of Detective Comics, requested that Grant "tone down" the script, as he felt Anarky becoming a murderer at such a young age was morally reprehensible. Grant consented to the request and the script was rewritten. In a 2004 interview, Grant explained the motivation behind this early decision: "I wanted to play it that way because it created incredible tension in Anarky himself. Other heroes might kill—Batman used to, in the early days—but for a teenager to rationally decide to take lives ... well, it hadn't been handled in comics before. But Denny was boss, and I respected his opinion and toned things down".

Although Grant had not created the character to be used beyond the two-part debut story, positive reactions from reader letters and his editor caused him to change his mind. He then decided to make Lonnie Machin the third Robin, following Jason Todd, desiring a new sidekick who would act as a foil to Batman, and not have the same motivations for vengeance. This was abandoned when he learned that Tim Drake had already been created to fill the role by Marv Wolfman. Quickly rebounding from this decision, Grant instead used the second appearance of Anarky as the antagonist for Tim Drake's first solo detective case.

This appearance came in Detective Comics #620. The story chronicles that Anarky increases his computer skills during his detention to the point of becoming an advanced grey hat computer hacker. He takes on the online user alias "Moneyspider" to steal millions of dollars from Western corporations, including Wayne Enterprises, outmaneuvering Batman's own data security in the process. He then uses the money to create bank accounts for poor farmers in Third World countries. Tim Drake pursues the hacker in an online investigation, tracking Anarky to his location at the detention center. In 2008, Fabian Nicieza would revert Lonnie Machin to this early alias as part of an attempt to reuse the character following a period of absence lasting approximately 10 years.

In the years following Anarky's creation, the character was rarely incorporated into Batman stories by Grant, being reserved for stories in which the author felt the need to make a philosophical point. Throughout the early 1990s, Anarky was a lesser-known, but established antagonist in the Batman franchise, frequently depicted as escaping from the detention center and peregrinating around Gotham City. However, his back-story had still yet to be elaborated upon. Grant provided hints to Anarky's origin in Robin (vol. 2) Annual #1, "The Anarky Ultimatum", part of Eclipso: The Darkness Within crossover event. Within the story it is revealed that Lonnie Machin was a highly intelligent child who from an early age read prodigiously at local bookstores, but had few friends. Published in 1992, it would not be until 1995 that Grant would finally elaborate upon Lonnie Machin's fictional history.

1995 saw Grant begin the slow increase in the character's abilities that would culminate in the Anarky series. In the "Anarky" story arc from Batman: Shadow of the Bat #40–41, Lonnie is released from juvenile detention, and builds a machine that allows him to fuse both hemispheres of his brain, giving him increased intelligence, and what he perceives as enlightenment. Creating an online bookstore, Anarco, to propagate radical literature, he begins to accumulate funds that he donates through another front company, The Anarkist Foundation, to radical organizations, such as eco-warriors and gun protesters, or keeps for his own projects. These story devices served to further improve Anarky's skill set, and increase his intelligence and financial independence. During this storyline, Grant finally revealed Lonnie Machin's origins in full, using a farewell letter to his parents to provide exposition into the character's motivations. The origin story narrates through flashbacks that Lonnie Machin was once an ordinary child who, while abnormally intelligent, was apolitical and unaware of world events. At 11, he gains a foreign pen pal, Xuasus, as part of a school program. Through this contact, Lonnie discovers the level of global corruption he never knew of before. Further studies into war and political violence leads him to hold radical sympathies. He comes to view all wars as being caused by political elites, with common individuals forced or cajoled into fighting on behalf of the former. He becomes convinced of the need to reshape society and becomes Anarky.

During the Anarky series, much of the character's development was influenced by the nature of Grant and Breyfogle's association. As part of the story writing process, the duo would engage in philosophical discussion carried out entirely over fax-transmissions. These long, in-depth, and occasionally heated debates influenced plot points, as well as the general direction of Anarky's character development. Because of this, Breyfogle personally considers Anarky to be among their few co-creations, whereas he considers other characters they "made" together, such as the Ventriloquist, to be entirely Grant's creations.

1997–1999: Anarky series