The Aetolians [...] offered a gallant resistance to the assault of the siege artillery and [the Romans], therefore, in despair had recourse to mines and underground tunnels. Having safely secured the central one of their three works, and carefully concealed the shaft with wattle screens, they erected in front of it a covered walk or stoa about two hundred feet long, parallel with the wall; and beginning digging from that, they carried it on unceasingly day and night, working in relays. For a considerable number of days the besieged did not discover them carrying the earth away through the shaft; but when the heap of earth thus brought out became too high to be concealed from those inside the city, the commanders of the besieged garrison set to work vigorously digging a trench inside, parallel to the wall and to the stoa which faced the towers. When the trench was made to the required depth, they next placed in a row along the side of the trench nearest the wall a number of brazen vessels made very thin; and, as they walked along the bottom of the trench past these, they listened for the noise of the digging outside. Having marked the spot indicated by any of these brazen vessels, which were extraordinarily sensitive and vibrated to the sound outside, they began digging from within, at right angles to the trench, another underground tunnel leading under the wall, so calculated as to exactly hit the enemy's tunnel. This was soon accomplished, for the Romans had not only brought their mine up to the wall, but had under-pinned a considerable length of it on either side of their mine; and thus the two parties found themselves face to face.
Another extraordinary usage of siege-mining in the ancient Greece, where during Philip V of Macedon's siege of the little town of Prinassos, according to Polybius, "the ground around the town were extremely rocky and hard, making any siege-mining virtually impossible. However, Philip ordered his soldiers during the cover of night collect earth from elsewhere and throw it all down at the fake tunnel's entrance, making it look like the Macedonians were almost finished completing the tunnels. Eventually, when Philip V announced that large parts of the town-walls were undermined, the citizens surrendered without delay."
Mining was a siege method used in ancient China from at least the Warring States (481–221 BC) period forward. When enemies attempted to dig tunnels under walls for mining or entry into the city, the defenders used large bellows (the type the Chinese commonly used in heating up the blast furnace for smelting cast iron) to pump smoke into the tunnels in order to suffocate the intruders.
Middle Ages 
In warfare during the Middle Ages, a "mine" was a tunnel dug to bring down castles and other fortifications. Attackers used this technique when the fortification was not built on solid rock, developing it as a response to stone-built castles that could not be burned like earlier-style wooden forts. A tunnel would be excavated under the outer defenses either to provide access into the fortification or to collapse the walls. These tunnels would normally be supported by temporary wooden props as the digging progressed. Once the excavation was complete, the attackers would collapse the wall or tower being undermined by filling the excavation with combustible material that, when lit, would burn away the props leaving the structure above unsupported and thus liable to collapse. Later, explosives like gunpowder were used for even greater effect.
A tactic related to mining is sapping the wall, where engineers would dig at the base of a wall with crowbars and picks. Peter of les Vaux-de-Cernay recounts how at the battle of Carcassonne, during the Albigensian Crusade, "after the top of the wall had been somewhat weakened by bombardment from petraries, our engineers succeeded with great difficulty in bringing a four-wheeled wagon, covered in oxhides, close to the wall, from which they set to work to sap the wall"
As in the siege of Carcassonne, defenders worked to prevent sapping by dumping anything they had down on attackers who tried to dig under the wall. Successful sapping usually ended the battle since either the defenders would no longer be able to defend and surrender, or the attackers would simply charge in and engage the defenders in close combat.
Several methods resisted or countered undermining. Often the siting of a castle could make mining difficult. The walls of a castle could be constructed either on solid rock or on sandy or water-logged land, making it difficult to dig mines. A very deep ditch or moat could be constructed in front of the walls, as was done at Pembroke Castle, or even artificial lakes, as was done at Kenilworth Castle. This makes it more difficult to dig a mine, and even if a breach is made, the ditch or moat makes exploiting the breach difficult.
Defenders could also dig counter mines. From these they could then dig into the attackers' tunnels and sortie into them to either kill the miners or to set fire to the pit-props to collapse the attackers' tunnel. Alternatively they could under-mine the attackers' tunnels and create a camouflet to collapse the attackers' tunnels. Finally if the walls were breached, they could either place obstacles in the breach, for example a cheval de frise to hinder a forlorn hope, or construct a coupure. The great concentric ringed fortresses, like Beaumaris Castle on Anglesey, were designed so that the inner walls were ready-built coupures: if an attacker succeeded in breaching the outer walls, he would enter a killing field between the lower outer walls and the higher inner walls.
American Civil War 
During the Siege of Vicksburg, in 1863, Union troops led by General Ulysses S. Grant tunnelled under the Confederate trenches and detonated a mine beneath the 3rd Louisiana Redan on June 25, 1863. The subsequent assault, led by General John A. Logan, gained a foothold in the Confederate trenches where the crater was formed, but the attackers were eventually forced to withdraw.
A more famous instance occurred during the Siege of Petersburg: Union troops dug a tunnel under the Confederate lines at Elliott's Salient and packed its end with vast amounts of gunpowder. When set off, the resulting explosion killed about 300 soldiers. It might have been decisive if not for the faulty Union tactic of storming into, rather than around, the resulting crater, allowing the defenders to shoot down onto attackers unable to climb the steep crater sides. The combat was accordingly known as the Battle of the Crater. The horror of this engagement was portrayed in the Charles Frazier novel, and subsequent Anthony Minghella movie, Cold Mountain.
Modern warfare 
Mining saw a brief resurgence as a military tactic during the First World War, when army engineers attempted to break the stalemate of trench warfare by tunneling under no man's land and laying large quantities of explosives beneath the enemy's trenches. As in siege warfare, mining was possible due to the static nature of the fighting.
A notable example was the Battle of Messines, when 450 tonnes of high explosive were placed in 21 mines after about two years of sapping. Approximately 10,000 German troops were killed when 19 of the mines were simultaneously detonated. The two remaining mines were not detonated, as they were outside the battlefield. To the great discomfort of the townspeople, the British misplaced the documents containing the precise details and positions of the two remaining mines. One of the mines detonated on June 17, 1955 during a thunderstorm; the only casualty was a cow. The second mine remains undetected. Recently, its location is believed to have been pinpointed, yet no one has attempted to recover it — thus, there are still several tonnes of high explosive buried somewhere in the Belgian countryside.
Another example is recorded in Luis Trenker's Berge in Flammen. Whole mountain peaks in the Alps, such as Col di Lana, Lagazuoi and Marmolata, were detonated during the Italian Campaign of World War I.
Because troop movements in World War II were too fluid, and tunneling too slow, mining warfare was of little use during that conflict.
See also 
- Ebrey, Walthall, Palais (2006). East Asia: A Cultural, Social, and Political History. Boston: Houghton Mifflin Company.
- Ernst, O.H. (:1873). A Manual Of Practical Military Engineering, Prepared For The Use Of The Cadets Of The U. S. Military Academy, And For Engineer Troops.. New York: D. Van Nostrand. Retrieved 2007-11-19.
- Castles of Britain page about castle undermining