Moses v Macferlan (1760) 2 Bur 1005 is a foundational case in the law of restitution holding that in certain circumstances such as when money is paid by mistake, for failed consideration or under oppression; the law will allow the money to be recovered.

Facts 
Chapman Jacob had made out four promissory notes to Moses for 30s each.

Moses owed Macferlan £26, did not pay him and was sued. A settlement was reached at arbitration whereby Moses would pay Macferlan £20; and endorse to Macferlan the four promissory notes he had received from Jacob. Moses, endorsed these notes to Macferlan, thus transferring over rights to the money. Prior to Moses endorsement, Macferlan assured him that his endorsement would not prejudice him. In other words, Macferlan would not seek to get the value of the notes from Moses. There was also an agreement signed by Macferlan that Moses should "not be liable to the payment of the money or any part of it".

Despite Macferlan's assurances and agreement with Moses; he summoned Moses into the Middlesex Court of Conscience as the endorser of the four promissory notes.

The lawyer for Moses put the agreement before the court and offered to give evidence of it in Moses defence. However, the Court rejected this defence as beyond its jurisdiction, refused to receive evidence of it and gave judgment against Moses; holding that his endorsement establishing his liability. Moses paid the money, to the value of the four promissory notes, into court. Macferlan then withdrew the money at the order of the court.

On the subsequent action of Moses in the King's Bench court to recover the £6, the jury found that Moses was entitled to the money subject to the opinion of the court on the question, "Whether the money could be recovered in the present form of action, or whether it must be recovered by an action brought upon the special agreement only".

William Gummow has summarised the problem that the court had to deal with; "The root of the doctrinal problem presented to the King’s Bench in Moses v. Macferlan was the absence of an accepted basis for the action for money had and received. Lord Mansfield gave a number of settled instances where the action lay, but the instant case did not fall within any of them. Lord Mansfield also sought to find a principle within which past, present, and future cases might be accommodated. Given what he saw as the rigidities of the common law, Lord Mansfield looked to equity for an appropriate analogy upon which the common law should draw."

Judgment 
Lord Mansfield CJ dealt with a number of objections to allowing the plaintiff's action in Assumpsit.

Firstly, he noted the objection "That an Action of Debt would not lie here and no Assumpsit will lie, where an Action of Debt may not be brought"; and responded that the rule was "That an Action of Assumpsit WILL lie in many cases where Debt lies and in many where it does not lie."

Secondly, he dealt with the objection, "That no Assumpsit lies, except upon an express or implied Contract"; answering "If the Defendant be under an Obligation, from the Ties of natural Justice, to refund; the Law implies a Debt, and gives this Action, founded in the Equity of the Plaintiff's Case, as it were upon a Contract".

Thirdly, Lord Mansfield rejected the assertion that a court's judgment could not be revised by a new action; "Money may be recovered by a right and legal judgment; and yet the iniquity of keeping that money may be manifest, upon grounds which could not be used by way of defence against the judgment."

Lord Mansfield then held,"This kind of equitable action, to recover back money, which ought not in justice to be kept, is very beneficial, and therefore much encouraged. It lies for money which, ex aequo et bono, the defendant ought to refund; it does not lie for money paid by the plaintiff, which is claimed of him as payable in point of honour and honesty, although it could not have been recovered from him by any course of law; as in payment of a debt barred by the Statute of Limitations, or contracted during his infancy, or to the extent of principal and legal interest upon an usurious contract, or, for money fairly lost at play: because in all these cases, the defendant may retain it with a safe conscience, though by positive law he was barred from recovering. But it lies for money paid by mistake; or upon a consideration which happens to fail; or for money got through imposition, (express or implied) or extortion; or oppression; or an undue advantage taken of the plaintiff's situation, contrary to laws made for the protection of persons under those circumstances. In one word, the gist of this kind of action is, that the defendant, upon the circumstances of the case, is obliged by the ties of natural justice and equity, to refund the money."

Significance 
Lord Mansfield's judgment in Moses v Macferlan is credited with founding the entire common law of unjust enrichment. It has been described in the United Kingdom Supreme Court as "a corner-stone of common law restitution".

As Peter Birks noted of Mansfield's statement of law (cited above), "This corresponds very closely to the modern structure of the law of unjust enrichment. The phrase "unjust enrichment" does not actually appear. But "money which ought not in justice to be kept" is "unjust enrichment", cut down to money as the form of action necessitated."

Birks observes that Mansfield's classification of unjust factors, "was endowed with the authority of scripture and broadcast to the world by Blackstone. He adopted it in the third volume of his Commentaries, which came out in 1768. Following Lord Mansfield almost verbatim, Blackstone says that the plaintiff is entitled to recover "where money is paid by mistake, or on a consideration which happens to fail, or through imposition, extortion, or oppression, or where undue advantage is taken of the plaintiff's situation".

See also 
 English unjust enrichment law 
 Landmark cases in the Law of Restitution 
Roxborough v Rothmans of Pall Mall Australia Ltd [2001] HCA 68 - Justice Gummow gives a detailed history of Moses v Macferlan at [76]-[89].

References 

English unjust enrichment case law
1760 in case law
Unjust enrichment
Court of King's Bench (England) cases
1760 in British law