Tactical Withdrawal

""They are extremely powerful, and quite frankly we haven't a snowflake's chance in Vulcan's forge of winning. I suggest a *cough* tactical advance away from the enemy!""

- Roman General, Rome: Total War

Although this has been used as a euphemism for "legging it", this is not quite the same thing. This is a managed retreat rather than an all-out rout, with forces withdrawing in good order to fight another day. They may have actually done their job, i.e. a Delaying Action.

A move like this could, if done right, be almost as effective as a battle victory, at least in terms of damage to the opponent's morale. Indeed, the attacking soldiers, hyped for battle, will often find themselves confused and frustrated if their intended target is not where they expected it to be, and chances are that the higher command will be disappointed at being cheated out of what they saw as an easy victory, and the development can possibly force them to change parts of their strategy, if not throw it completely out of the window. More importantly, an orderly retreat is always less costly than a rout. A routed force is broken. A retreating force is merely leaving.

Common in guerilla warfare. Also a necessary first step in a Defensive Feint Trap.

Literature

 * In The Third World War, it is stated in the description of the first TV footage of Soviet and US forces clashing in Slovenia (smuggled out from the battlefield by a reporter) that a military observer would note the Soviets were performing a textbook withdrawal under fire.
 * One scene from Lord of the Rings describes Faramir attempting to do this and leading his men back to Minas Tirith in an orderly retreat despite having already lost one battle and continuing to be harassed by the enemy cavalry. Then the Nazgul get involved and it does turn into a rout until Gandalf and some Gondorian knights do the Big Damn Heroes thing.
 * Almost every large-scale battle in the Codex Alera involves the heroes doing this at some point when things are ready to progress to a later stage of the battle. A few times it even gets subverted into the withdrawal turning into an all-out rout.

Tabletop Games

 * A mechanic in Warhammer, Warhammer 40000, and other Games Workshop games - units that take losses or have scary things happen to them and subsequently fail a morale test will fall back, fleeing towards a friendly table edge. If on the next turn the unit passes another morale test and still has the numbers to form a squad, they rally and can continue to fight as normal, turning last turn's flight into a retroactive Tactical Withdraw. If they fail that second test then they'll continue to leg it off the table.
 * Depending on the edition, you can choose to voluntarily fail a morale test and hope that next turn you'll be able to rally. This is referenced with the "General Staff" asset from the Apocalypse rules for 40k, which lets a commander roll three dice and choose which two to use for a Leadership test. The rules explicitly state that a commander choosing the two higher dice to fail the test is ordering his troops to withdraw.
 * Space Marines have the "And They Shall Know No Fear" special rule, which means that they always perform a Tactial Withdraw and regroup after falling back. As of their latest Codex, they also have the "Combat Tactics" special rule, allowing them to voluntarily "fail" a morale test, fall back, and then rally thanks to the aforementioned special rule.
 * And then some units don't bother with a Tactical Withdraw. Fearless units never fall back, preferring to fight to the last man, while sufficiently zealous units like the Black Templars or Sisters Repentia will charge the enemy if they fail a morale test.

Video Games

 * Often a good idea in Rome Total War: Barbarian Invasion, if you are moving away from the vast Barbarian hordes, the AI often charges in with it's fastest and lightest units, allowing you to inflict some losses on the horde before taking position on a hilltop or something to make your last stand.
 * The AI will commit its forces to a tactical withdrawal if you force it into a pitched battle with a superior army -- it deploys as far away from your army as possible and heads for the edge of the map as fast it can. With a good cavalry force, you can often take down some of the stragglers before they disappear off-map -- the AI is not very good at regrouping just to try and kill your advance cavalry.
 * Company of Heroes has a retreat button for all infantry so they can reinforce and regroup at your base. Also useful if you just want them to get back there or somewhere close by.
 * Dawn Of War 2 used a similar system - but make sure you initiate it before enemy engages in melee, if you don't want your retreat to become a slaughter barely better (or possibly even worse) than fighting a losing battle anyway, because retreating units take more melee damage.
 * Even better, since units will always retreat to the nearest captured point, you can actually use this to your benefit. Sneak a stealth unit through enemy lines to capture a point, then get the rest of your army over halfway there. Hammer X, and... well, retreat in the opposite direction.
 * Part of normal combat in Warcraft 3, with heroes or armies attacking, doing some damage to the enemy base/expansion/army, then pulling out, except when in a strong enough position to just annihilate the opposition. Sometimes done via Town Portal Scroll if walking is not an option, or would result in losses.
 * Lampshaded in World of Warcraft, with one of the achievements being titled, "We're Not Retreating; We're Advancing in a Different Direction".
 * World of Warcraft also makes it possible to "reset" a boss during an ill-fated fight without all the players dying, and sometimes without any player dying. Mages have the Invisibility spell to help with this, while other players have to run out of the room and survive any damage they take along the way.
 * Necessary in Battle for Wesnoth. Not withdrawing near the end of your strong time-of-day generally results in heavy losses, unless you're already in an overwhelmingly strong position. Particularly important for the Loyalists, Undead and Drakes, whose strength varies drastically with the time-of-day.
 * An option in the Hearts of Iron games when it is clear that a division cannot win against an enemy force but still has enough organization to maintain contact. It is entirely reasonable to withdraw a defending division when attacked, as at the very least the enemy division will have to delay several days before its next attack, and is an essentialy element of setting up encirclement traps. Pulling an attacking division out of an assault that is clearly not working will save organization and manpower as well. This can also be pulled off as a tactical maneuver during battle by generals. It shortens the front, and gives the attacker an attack penalty and the defenders also a smaller penalty (which still ends in a net win for the defenders.)
 * Fate Stay Night's Lancer has a C rank in the Disengage Personal Skill. While this may not sound like much, he's the only Servant in the Fifth War with that skill at all, meaning he'd be perfect for scouting if not for his Blood Knight personality, and his sense of honor. Unfortunately for him,  cares not one jot about Lancer's personality or honor, and Command Seals Lancer into acting as a scout, making him engage each Servant to test their strength before disengaging and stepping out of the War, leaving the other six to fight it out. While this normally would be a suicidal tactic in the Grail War, it helps that his Master also has access to the Game Breaker
 * In the Codex of Mass Effect, this is stated to be a favorite tactic of the turians. Turians never retreat, even if the line collapses, instead withdrawing in an organized fashion. As they do so, they set traps and ambushes to wittle down the pursuing enemy. Thus creating the in-universe saying that "you will only see a turian's back once he's dead."

Other

 * In Code Geass the Abridged Series, Cornelia chooses not to retreat, but to "retake land that we've already conquered!"

Real Life

 * Although quite common in war (outside of Hollywood, anyway), probably one of the more famous retreats of the 20th century (and certainly one of the more bloody, given the local conditions even before considering this is during a war) is US forces breaking out of the December 1950 Chinese trap laid at the Chosin Reservoir, in the Korean War. Considering that the troops involved fought a pitched battle to get back the way they came, it is slightly unclear if this can be defined as a retreat. (It was this battle that was the occasion of the famous quote by U.S. Marine General Oliver P. Smith "Retreat, hell! We're not retreating, we're just advancing in a different direction.")
 * It generally requires well trained troops to pull this off, the details vary with the terrain, but it generally involves some sections breaking off and others laying down suppressive fire. Militia and less professional armies generally break and run if overwhelmed, but with proper organization and planning, they merely disperse, re-group, and get back into the fight under more favorable conditions. These tactics are particularly important for guerrilla forces, which can expect to face overwhelming odds on a regular basis if they don't pull out before their stronger enemy rallies additional forces if the fight stays in one spot for too long.
 * Generally it's a sort of reverse leapfrog (used while advancing) where those in front retreat to the rear of the group while the rest fire forward. Once settled into the rear, those now in front retreat to the back of this. Repeat.
 * Alternatively, if one's army is severely out manned or out gunned, and the terrain sufficiently rough, a dispersal followed by a rejoining of forces in a pre-determined location may prove more effective. Standing your ground for even a delaying action is not always an option.
 * George Washington was particularly skilled at organizing tactical retreats during The American Revolution. He realized that preserving the revolutionary army was a higher priority than defeating the British in battle.
 * Similar to the above example, the American Civil War lasted for years due to the well-executed retreats by either side after losing a battle.
 * This meant that the defeated army could reach safety and regroup for later combat. "He who fights and runs away will live to fight another day" in all truth.
 * Robert E. Lee's Army of Northern Virginia had been defeated by other Union generals, but only Ulysses S. Grant was able to prevent a successful retreat by the Confederate army.
 * The small but well-trained British Expeditionary Force at the start of World War One made a famous fighting retreat from Mons, repeatedly holding up the German advance in 1914 while the French got their defences on the Marne organised.
 * The (disastrous) retreat of the British from Afghanistan through the Khyber Pass in 1842.
 * Xenophon's Ten Thousand Mercenaries.
 * The Parthians, and later the Mongols, were experts at using tactical withdrawals and feigned retreats to make their enemies overstrech their forces. They would send in light horse to harass the enemy and 'flee' once the enemy sent in their own cavalry to counter. The enemy cavalry would give chase until they were out of reach of the rest of the army -- at which point the 'fleeing' army would regroup, surround them and crush them, or simply pepper them with arrows as they led them further away from friendly lines.
 * Happened a couple of times in the Peninsular War (depicted in Sharpe). At the Retreat to Corunna, the British expeditionary force retreated from the superior French army, giving battle before Corunna long enough for them to escape. Later, British troops retreated from another large French force by delaying them long enough to build the Lines of Torres Vedras, a massive series of fortifications protecting the Portuguese capital of Lisbon. The French were left facing an impenetrable city and a huge army to try and feed with a country whose crops and livestock had deliberately been destroyed.
 * On a grander scale, the 1812 campaign from the Russian point of view. Through a series of tactical retreats, the main armies managed to elude Napoleon's attempts to pin down, outflank and overwhelm them. Napoleon attempted an orderly retreat from Moscow, but the Russian armies then forced to march back the way he came, through lands that had already been devasted and bled of resources during the French advance, and the retreat eventually turned into a shambles.
 * During the early stages of the autumn campaign of 1813 Wars of Liberation, the allied forces on the whole successfully pursued the strategy of executing tactical retreats when faced by armies led by Napoleon himself while attacking armies led by his marshals. They did lose the battle of Dresden against Napoleon himself, but this defeat was more than offset by the simultaneous victories of Großbeeren and the Katzbach, as well as the battle of Kulm where the defeated allied main army brought the pursuing French I Corps to grief.
 * The Prussian army executed a good one after the battle of Ligny, which enabled them to decisively join the battle of Waterloo two days later. As an added bonus, they managed to do it in a way where the French lost contact with them so they had no idea where Blücher's men had gone.
 * The British were able to spin the Dunkirk evacuation in World War Two as "The Miracle of Dunkirk," in which the British Expeditionary Force and some part of the French managed to escape the Nazis to fight another day.

Television

 * In Red Dwarf the crew must "Obtain" a new engine part, and after negotiations with a local tribe fails they attempt to steal it and sneak away, after this fails Lister grabs the part and runs back to the ship, as he passes the other crew members that are waiting he shouts... "Change of plan -- leg it!"

Western Animation
"Skipper: Kowalski, options.
 * The Penguins of Madagascar has the team face Officer/Agent X:

Kowalski: A strategic retreat, Skipper?

Skipper: Explain.

Kowalski: It's like running away but manlier.

Skipper: Execute."

Webcomics

 * Erfworld has the protagonist conduct a number of hit-and-run attacks that technically count as "losses" by the world's rules, but his opponent loses far more valuable siege units.
 * Last Res 0 rt technically pulls this one off after the players realize they're not equipped to take Gabriel's ship in their current condition thanks to Tone attacks and 'unreliable' equipment. The fact that  does NOT help matters.