"I return my thanks for the copy of your late very powerful Speech in the Senate of the United S. It crushes "nullification" and must hasten the abandonment of "Secession." But this dodges the blow by confounding the claim to secede at will, with the right of seceding from intolerable oppression. The former answers itself, being a violation, without cause, of a faith solemnly pledged. The latter is another name only for revolution, about which there is no theoretic controversy. Its double aspect, nevertheless, with the countenance recd from certain quarters, is giving it a popular currency here which may influence the approaching elections both for Congress & for the State Legislature. It has gained some advantage also, by mixing itself with the question whether the Constitution of the U.S. was formed by the people or by the States, now under a theoretic discussion by animated partizans."
Okay, now you're getting somewhere. Typical of much of Madison's writings, this one has several thoughts held simultaneously and layers of reasoning that must be peeled and savored like a fine Vidalia onion.
The two subjects he touches upon are nullification and secession; I think we'll both agree on that. Nullification was never constitutional and I have disavowed any acceptance of it on these threads (maybe not to you, but one of your compatriots).
Secession is the trickier subject in this letter (written nearly 50 years after his participation in establishing the Federal government). In the letter he says that there are two kinds of secession ("the claim to secede at will, with the right of seceding from intolerable oppression"). I'm sure you'll agree with me to this point.
The deeper layer is his take on its justification. Secession from intolerable oppression "is another name only for revolution," but given Madison's role in our nation's founding he cannot condemn outright the concept of revolution. Therefore, not stated but logically inferred, there can be "no theoretic controversy" that secession, at times, can be justified.
Madison asserts a states sovereignty in Federalist No. 39:
"Each State, in ratifying the Constitution, is considered as a sovereign body, independent of all others, and only to be bound by its own voluntary act. In this relation, then, the new Constitution will, if established, be a federal, and not a national constitution."
He continues in the same document:
"In the former case [a national government], all local authorities are subordinate to the supreme; and may be controlled, directed, or abolished by it at pleasure. In the latter [a federal government], the local or municipal authorities form distinct and independent portions of the supremacy, no more subject, within their respective spheres, to the general authority, than the general authority is subject to them, within its own sphere. In this relation, then, the proposed government cannot be deemed a national one; since its jurisdiction extends to certain enumerated objects only, and leaves to the several States a residuary and inviolable sovereignty over all other objects."
In Federalist No. 45, Madison states:
"The powers delegated by the proposed Constitution to the federal government, are few and defined. Those which are to remain in the State governments are numerous and indefinite. The former will be exercised principally on external objects, as war, peace, negotiation, and foreign commerce; with which last the power of taxation will, for the most part, be connected. The powers reserved to the several States will extend to all the objects which, in the ordinary course of affairs, concern the lives, liberties, and properties of the people, and the internal order, improvement, and prosperity of the State."
And finally, in 1799, he wrote:
"The Constitution of the United States was formed by the sanction of the states, given by each in its sovereign capacity. It adds to the stability and dignity, as well as to the authority of the Constitution, that it rests on this legitimate and solid foundation. The states, then, being the parties to the constitutional compact, and in their sovereign capacity, it follows of necessity, that there can be no tribunal above their authority, to decide in the last resort, whether the compact made by them be violated; and, consequently, that, as the parties to it, they must themselves decide, in the last resort, such questions as may be of sufficient magnitude to require their interposition."
Therefore, given Madison's views on sovereignty and secession, there is no appeal to his writings that supports your claim.