Coding War: The Lieber Code as a Prototype of Modern Technological Governance

by | Nov 20, 2026

Lieber

In 1863, under President Abraham Lincoln’s direction, the Union Army issued what is widely regarded as the first comprehensive codification of the laws of war by a State’s military, setting out rules for how armies should conduct themselves amid rapid social and technological change. Francis Lieber, a Prussian immigrant who taught at Columbia College and advised Alexis de Tocqueville, drafted the document, which was then revised by a board of Union Army officers. The War Department approved the final version and issued it as General Orders No. 100, a set of 157 articles for “the government of armies of the United States in the field” that came to be known as the Lieber Code.

Behind the Lieber Code lies a political drama that has captivated the academic literature but is largely overlooked outside scholarly circles. It is a story of wartime State-building and legal innovation that forged the foundations of modern international humanitarian law (IHL). It is a story of the repudiation of slavery and recognizing enslaved people as persons entitled to protection and emancipation under the laws of war. The Code’s core principles, most notably its systematization of military necessity, the distinction between private individuals and the hostile State, and the prohibition of unnecessary suffering, went on to form the basis [p. 349] of the Hague Conventions, the Geneva Conventions, and customary international law on armed conflict. Its formulation “determined the practice of armies not only in the United States but in many other countries for years to come.”

The Lieber Code can also be understood as an early model of technological governance. Amid changes ranging from communication to transportation, new technologies transformed the speed, supply systems, and ultimately the ground realities of war. President Lincoln’s authorization of the Lieber Code was an effort to likewise reshape the legal and moral boundaries of warfare. The Lieber Code translated broad principles into instructions for armies operating amid changing military capabilities. Its contemporary value lies in that approach, rather than in treating its nineteenth-century rules as sufficient for today’s battlefield.

What can this effort teach us about governing today’s artificial intelligence, cyber capabilities, and autonomous weapons? This post explores a model of proactive lawmaking that takes changing military technologies seriously and translates concern about their consequences into practical limits on their use. This means applying existing humanitarian protections while developing new rules to address uncertainty and gaps in protection before harmful practices become entrenched.

Technologies of Industrial Warfare

In the decades before the Civil War, the United States rapidly expanded its railroad and telegraph systems. By 1860, the railroad network reached about 30,000 miles of track linking major cities in the North and the expanding Midwest. Telegraph lines grew to over 50,000 miles following the introduction of Morse’s system in the 1840s. By the late 1850s, Western Union consolidated regional telegraph lines into a national network, with railroad stations serving as key communication hubs. So thoroughly did the telegraph transform the speed of communication that, when President Lincoln was assassinated on the evening of April 14, 1865, news of the event was carried across telegraph wires and reached much of the nation within just a few hours.

During the Civil War, railroads and telegraphs were central to military strategy and made the conflict the first modern industrial war. Railroads allowed armies to move tens of thousands of troops and large quantities of supplies quickly across long distances, making logistics faster and more decisive than in earlier wars. Telegraph lines enabled near-instant communication between commanders and political leaders. For example, in the weeks after Antietam, the bloodiest single day of the war, Lincoln used the telegraph to press General George McClellan to pursue Robert E. Lee’s retreating army, sending urgent messages as the opportunity slipped away. McClellan’s delays, visible in real time from Washington, deepened Lincoln’s frustration and contributed to his removal from command.

Advancement in weapons technology increased the use of weapons with the potential to make combat more lethal. Rifled muskets offered greater accuracy and range than smoothbore muskets, though inadequate training, poor visibility, and short engagement distances often limited their advantages. At Gettysburg in 1863, Pickett’s Charge demonstrated the dangers of advancing across open ground against combined artillery and infantry fire. Repeating rifles such as the Spencer offered another advance. They allowed soldiers to fire seven shots before replenishing the magazine (though their adoption was limited).

Artillery also improved markedly during the war. Rifled cannons like the Parrott rifle offered greater accuracy and longer range than smoothbores. During the nine-month siege of Petersburg, in which Union forces attempted to cut off Confederate supply lines and force the fall of Richmond through trench warfare, Parrott rifles bombarded Confederate fortifications with greater accuracy and range than smoothbore cannon, making rifled artillery a key tool in prolonged siege warfare.

New Terms and Conditions

Lieber understood firsthand the growing brutality of modern warfare, with advances in military technology making conflict increasingly destructive. As a young man, he joined the struggle for Prussia’s liberation from Napoleon and took part in the 1815 Waterloo campaign, where he sustained a serious neck wound and was left for dead. The American Civil War was also deeply personal for Lieber. One of his sons fought for and died in the Confederacy, while the other two served in the Union Army. His youngest son, Guido Norman Lieber, later rose to become Judge Advocate General of the U.S. Army (and is the namesake of the West Point Lieber Institute, host of this blog).

Recognizing that modern weaponry produced mass casualties and destruction, the Lieber Code distinguished between lawful and unlawful harm. It grounded its approach to technologies of warfare, old and new, in the principle of military necessity. The doctrine allowed only “those measures which are indispensable for securing the ends of the war,” subject to the laws and usages of war. Article 16 expressly excluded cruelty from military necessity, defining it as “the infliction of suffering for the sake of suffering or for revenge.” It also ruled out “torture to extort confessions,” “the use of poison in any way,” “the wanton devastation of a district,” and, more broadly, “any act of hostility which makes the return to peace unnecessarily difficult.”

However, the Code permitted the destruction or disruption of enemy communication and transportation networks when required by military necessity. During the Civil War, Union forces under General William Tecumseh Sherman applied this principle in campaigns such as the advance through Georgia. Sherman’s troops targeted Confederate railroads, bridges, and telegraph lines to weaken the South’s ability to move troops and coordinate logistics. Railroad tracks were often bent and twisted into unusable shapes. This practice came to be known as “Sherman’s neckties.”

In response to the growing destructiveness of artillery technology, the Lieber Code regulated bombardment and siege warfare. It required the protection of hospitals, cultural institutions, and scientific collections from avoidable damage in besieged or bombarded cities. It directed commanders to warn civilians before bombardment when feasible. These pressures were visible when Sherman captured Atlanta in 1864. Sherman viewed the city’s civilian population as a logistical burden and sought to avoid responsibility for protecting civilians in an active war zone. He directed residents to leave rather than undertaking these precautions.

The Lieber Code also reflected the growing role of intelligence and what would today be described as irregular warfare in an era of expanding communications and surveillance capabilities. It distinguished lawful scouting and deception from espionage. It recognized that deception can be “just and necessary… and consistent with honorable warfare” but prescribed severe punishment, including death, for clandestine or covert acts because they are “so dangerous, and it is difficult to guard against them.”

Rose O’Neal Greenhow was a Confederate intelligence agent operating in Washington, D.C. during the early war years. Her story shows the challenges of distinguishing civilians from combatants in the emerging world of modern intelligence warfare. Greenhow ran an informal spy network that collected information on Union troop movements and passed it to Confederate commanders. Her network’s intelligence is credited with contributing to the Confederate victory at the First Battle of Bull Run in July 1861. She used coded messages and concealed reports to transmit intelligence across enemy lines. Greenhow was arrested by detective Allan Pinkerton in 1861, who was running counterintelligence operations for the Union. She was expelled to the Confederacy in 1862, where she was received as a hero. The Greenhow case illustrates a problem the Lieber Code later addressed: how to treat civilians who actively aid the enemy through espionage. She was imprisoned and expelled rather than executed, likely due to her social prominence and the political repercussions of executing a civilian woman.

Conclusions

Lieber’s legacy is a method of legal innovation, not a complete answer to contemporary dilemmas. Some of his rules permitted practices that modern IHL prohibits. Article 17, for example, allowed starving civilians to hasten an enemy’s submission. Modern treaty and customary law provide the governing framework today, and military necessity cannot override their prohibitions.

Cyber operations make the distinction concrete. Lieber permitted disruption of enemy communications and transportation. Today, disabling a power grid could interrupt military operations while also shutting down hospitals and water treatment. Attacks must comply with distinction, proportionality, and precautions, including assessment of reasonably foreseeable civilian harm. States should clarify how those protections apply when cyber operations disable services without physical destruction or delete civilian data, issues on which legal interpretations still differ.

AI and autonomous weapons similarly require both existing protections and specific safeguards. AI-generated target recommendations do not relieve human decision-makers of their legal obligations. Militaries should require checks on those recommendations and testing under expected operational conditions. For weapons that select and engage targets without further human intervention, countries should adopt binding restrictions that preserve human control and prohibit systems whose effects cannot be sufficiently understood or predicted. Such restrictions would give practical force to existing humanitarian principles.

That said, the central insight of 1863 remains unchanged. Technological innovation in the conduct of war calls for proactive innovation in its governance. As in Lincoln’s era, today’s technological transformations offer a historic opportunity for American leadership to translate innovation into not only military advantage but also institutions and law that protect generations to come.

***

Yelena Biberman is Associate Professor of Political Science at Skidmore College, Fellow of the Andrew W. Marshall Foundation, and Affiliate of Harvard University’s Davis Center. Her new book, Genetic Superpower: International Rivalry in the Age of Weaponizable Biotechnology, is forthcoming from Oxford University Press in January 2027.

The views expressed are those of the author, and do not necessarily reflect the official position of the United States Military Academy, Department of the Army, or Department of Defense.

Articles of War is a forum for professionals to share opinions and cultivate ideas. Articles of War does not screen articles to fit a particular editorial agenda, nor endorse or advocate material that is published. Authorship does not indicate affiliation with Articles of War, the Lieber Institute, or the United States Military Academy West Point.

 

 

 

 

 

 

 

Photo credit: A.B.C. Telegraphic Code 5th Edition