Article 1, Section 8, Clause 17 of the Constitution provides that among Congress' extremely limited powers is the power to "exercise exclusive Legislation ... over such District (not exceeding ten miles square) as may ... become the Seat of the Government of the United States."
In Federalist No. 43, James Madison explained that if Congress did not control the seat of government, federal officials would be dependent on the surrounding state "for protection in the exercise of their duty." The host state might "bring in the national counsels an imputation of awe or influence equally dishonorable to the government and dissatisfactory to the other members of the confederacy."
That's why the seat of government can't be a state or a part of a state. Rather, it was to be formed by the "cession of particular states," and with "the acceptance of Congress," the ceded land would "become the seat of the government of the United States."
In 1790, Maryland and Virginia ceded some of their land -- uninhabitable swampland, to be precise -- to the federal government, and pursuant to the Act of Acceptance, the District of Columbia was formally "accepted for the permanent seat of the government of the United States."
In a rare miscalculation, the Anti-Federalists denounced the clause on the grounds that the district of the national government would become a den of popery. Seriously: Popery -- as in the Roman Pontiff, servant of the servants of God, Vicar of Christ on Earth, whore of Babylon, etc., etc.
As it turned out, the principal use for the Bible in Washington for the last several decades was as a Sunday-morning prop for a felonious adulterer. (Shortly before the felon finally vacated the White House in January, he switched the license plates on the presidential limousine to the pro-D.C. statehood plates bearing the words: "Taxation Without Representation.")
Other than the burning popery issue, it was not a particularly controversial provision. Madison thought the district power clause "carries its own evidence with it." Of course, he thought the point of limited government was self-evident, too.