The pre-existing duty rule is an aspect of consideration within the law of contract. Originating in England the concept of consideration has been adopted by other jurisdictions, including the US.

In essence, this rule declares that performance of a pre-existing duty does not amount to good consideration to support a valid contract; but there are exceptions to the rule.

The Rule 
English law recognises bargains supported by consideration, not bare promises.  However, only simple contracts need consideration to be enforceable; special contracts do not require consideration. 

Currie v Misa (1875)   declares that consideration may comprise any of these positive and negative matters: 
 Right,  Interest,  Profit,  Benefit
 Forbearance,  Detriment,  Loss,  or Responsibility"

The basic rule
The leading case is Stilk v Myrick (1809),  where a captain promised 8 crew the wages of two deserters provided the remainders completed the voyage. The shipowner refused to honour the agreement; the court deemed the eight crew were unable to enforce the deal as they had an existing obligation to sail the ship and meet "ordinary foreseeable emergencies".

However, in two cases the courts held that claimants provide good consideration if they act "above and beyond" their contractual obligation:
 In Hartley v Ponsonby (1857), crew who were promised a bonus after half the complement deserted could enforce the promise of a bonus.
 In Glasbrook Bros v Glamorgan CC [1925], the police, who had been asked to protect a colliery from vandalism during a strike could seek recompense from the mine-owners.

Issues of "public policy"
The rule may be affected by issues of public policy, as in:
Collins v Godefroy (1831), England v Davidson (1840)   and Williams v Williams [1957]  
 In Collins v Godefroy  a subpoena'd witness to whom the defendant promised a guinea per day as "attendance money" could not enforce the agreement; the witness had an existing duty to attend and it would be contrary to public policy to permit such payments. After all, one might then contemplate paying witness not to appear!
In England v Davidson  a policeman was allowed to claim a reward for offering information leading to a criminal's capture; it was  held to be "in the interest of justice".
 In Williams v Williams, where a husband promised his estranged wife an allowance if she did not "pledge his credit", Lord Denning MR held the promise was enforceable as it was "not contrary to public policy:".

Issues of "Benefit"
The court may also enforce an agreement provided that is gives benefit:
 In Ward v Byham [1956]  an unmarried couple with a child separated after 5 years. The husband promised to pay the mother  £1 per week provided she ensured the child was well looked after and happy. The Court held that (although she had an existing duty to care) the promise was enforceable as being in the public interest.
 In  Williams v Roffey [1990]  a contractor subcontracted joinery work for an agreed price of £20,000. (The main contract with the client included a penalty clause for delay). The joiner ran out of funds and was heading for bankruptcy, so he asked the contractor for an extra amount, some of which was reluctantly paid. The job was finished on time, but the contractor refused to pay the final sum.  The court held that the revised agreement was enforceable and the contractor, by promising the extra cash, had received the valuable benefit of being free of penalties and possible problems with a new subcontractor.

Practical issues 
Any contracting party who wishes to amend the agreement must provide new consideration. This situation typically arises in one of three different ways:

 Pay less
If one party has performed their part of the contract, but the other party refuses to pay unless the amount owed is reduced, the full amount remains payable: Pinnel's Case (1602). Any attempt to use promissory estoppel will fail if the debtor behaves inequitably: D&C Builders v Rees[1966]

 Pay more
One party refuses to perform her side of the contract unless a larger sum of money is paid. For example, Christine agrees to sell Julian a set of textbooks for $300. Julian wires $300 to his friend Jake, who is charged with picking up the textbooks and delivering the $300. After the money has been wired and delivery arrangements have been made, Christine calls Julian and states that she has changed the price to $350 and will not deliver the books to Jake unless Julian promises to pay an additional $50. The rule will apply so Julian could agree to pay the extra money but then not do so when the books are delivered.  (If Julian actually paid the extra money, he could sue later under "duress" to recover the $50.)

 Public duty
The party seeking payment already has a public duty to perform the act. For example, a government employee polygraph expert might ask a criminal about an unrelated crime during the administration of a polygraph. If the criminal admits to the crime and the employee then seeks a reward for identifying the perpetrator, he would not be entitled to it under the legal duty rule because he already has a public duty to find out about crimes.

Exceptions 
The legal duty rule does not apply if the parties mutually agree to change the terms of the contract.  For example,the homeowner and contractor could agree to include a new window at an additional cost of $1000. Alternatively, the parties could agree not to perform part of the contract for a $500 reduction in the price. Both modifications to the original contract would be enforceable because there was consideration for each.  The legal duty rule protects one party when the other is trying to change the terms of the agreement unilaterally.

There are ways around the legal duty rule, such as mutual rescission of the existing contract with a clear indication of such rescission (literally tearing up the old contract). Also, in some states, parties may renegotiate contracts to include additional benefits if, for example, the party performs unexpected or additional duties, the parties assent in good faith, or a new contract is agreed.

If contractual parties owe each other existing contractual obligations but a third party offers a promise contingent upon performance of the contract, that promise has sufficient consideration.

In the US, under the Uniform Commercial Code, modifications may be made free of the Common Law legal duty rule even without consideration provided that the modification is made in good faith.  See UCC § 2-209.  However, the Statute of Frauds must be complied with. Thus, a written contract is necessary if the contract as modified comes within the scope of that statute.  For purposes of the UCC, a contract must be in writing if it is for the sale of goods where the price exceeds $500.  UCC § 2-201.

The pre-existing duty rule has been abrogated under the Restatement, Second of Contracts § 89, which does not require independent consideration if the parties mutually and voluntarily agree to the modification (see Angel v. Murray for an early application of the Restatement).  The restatement, however, will not always be followed, as evidenced by the decision in Labriola v. Pollard Group, Inc..

Maritime salvage
The pre-existing duty rule plays a part in salvage which is a "voluntary successful service to save maritime property in danger at sea". The service must be "voluntary": the salvor must not have an existing duty towards the ship.  Generally, a ship's crew cannot claim salvage unless
 they have been ordered to abandon ship (so that their contracts of employment have ended), The San Demetrio (1941);, or
 they act over and beyond their normal duty to look after the safety of the ship, The Beaver (1800).

References

 Rest. 2nd of Contracts, Section 73.
 UCC Section 2-209(1).

Contract law
Legal doctrines and principles