Historical Context
Federalist 51 is the companion to Federalist 10. Where No. 10 asks "how do we control factions?", No. 51 asks "how do we structure the government itself so it doesn't become tyrannical?" Madison's answer is the architecture of the Constitution: separation of powers, checks and balances, and federalism — all working together because human nature cannot be trusted.
This essay contains the most quoted line in the Federalist Papers: "Ambition must be made to counteract ambition." It is also the clearest statement of the Founders' view of human nature — not cynical exactly, but clear-eyed. People in power will abuse it. The Constitution's job is to make abuse structurally difficult, not to rely on leaders being virtuous.
Note: Some scholars debate whether Madison or Hamilton wrote No. 51. The AP exam attributes it to Madison and you should too.
I. The Problem — How Do You Control the Government?
To what expedient, then, shall we finally resort, for maintaining in practice the necessary partition of power among the several departments, as laid down in the Constitution? The only answer that can be given is, that as all these exterior provisions are found to be inadequate, the defect must be supplied, by so contriving the interior structure of the government as that its several constituent parts may, by their mutual relations, be the means of keeping each other in their proper places.
The Argument
You can't keep government in check from the outside alone — laws and declarations don't work. The government must be structured so its own internal parts keep each other in check. This is the logic behind checks and balances: design the machine to police itself.
II. Ambition Must Counteract Ambition
But the great security against a gradual concentration of the several powers in the same department, consists in giving to those who administer each department the necessary constitutional means and personal motives to resist encroachments of the others. Ambition must be made to counteract ambition. The interest of the man must be connected with the constitutional rights of the place.
The Key Line
"Ambition must counteract ambition" — each branch is given tools AND personal incentives to resist the others. A senator doesn't protect the Senate out of principle; they protect it because their own power depends on the Senate's power. Self-interest becomes constitutional protection.
It may be a reflection on human nature, that such devices should be necessary to control the abuses of government. But what is government itself, but the greatest of all reflections on human nature? If men were angels, no government would be necessary. If angels were to govern men, neither external nor internal controls on government would be necessary.
The "Angels" Line
The most famous sentence in Federalist 51. Madison acknowledges the system is complicated because humans are flawed. If people were perfectly virtuous (angels), we wouldn't need government at all. But they're not — so we need a system that works even when leaders are selfish or power-hungry.
In framing a government which is to be administered by men over men, the great difficulty lies in this: you must first enable the government to control the governed; and in the next place oblige it to control itself.
The Double Problem
Two tasks in tension: (1) government must be strong enough to control citizens, and (2) government must be constrained from controlling citizens too much. Checks and balances solve the second problem. This sentence is Madison's clearest statement of the design challenge the Founders faced.
IV. Justice and the Problem of Majority Rule
Justice is the end of government. It is the end of civil society. It ever has been and ever will be pursued until it be obtained, or until liberty be lost in the pursuit. In a society under the forms of which the stronger faction can readily unite and oppress the weaker, anarchy may as truly be said to reign as in a state of nature, where the weaker individual is not secured against the violence of the stronger.
Tyranny of the Majority
A majority faction that can oppress a minority is no better than anarchy — both leave the weaker party unprotected. This is Madison's argument for constitutional limits on majority rule: pure democracy without minority protections is just mob rule with nicer paperwork.
In the extended republic of the United States, and among the great variety of interests, parties, and sects which it embraces, a coalition of a majority of the whole society could seldom take place on any other principles than those of justice and the general good.
The Solution
In a large, diverse republic, any majority coalition that forms must be broad enough to include many different groups — which means it can only form around genuinely shared interests (justice and the general good), not around factional self-interest. This ties back to Federalist 10's "extend the sphere" argument.