In early 1832, the United States was close to Civil War. The Nullification Crisis pitted South Carolina against the Federal government over whether a state had the right to nullify Federal laws it did not agree with. Both sides had mobilized forces and the possibility of war had been real. While the crisis was handled by President Andrew Jackson, Martin Van Buren gave the President support and advice.
Wikipedia notes this of the Nullification Crisis, "The Nullification Crisis was a sectional crisis during the presidency of Andrew Jackson created by the attempt by the state of South Carolina to nullify a federal law passed by the United States Congress. South Carolina, in turn, was reacting to the Tariff of 1828 (also called the "Tariff of Abominations"). The lingering effects of an economic downturn, political maneuvering on both the national and the state level, conflicting interpretations of state versus federal powers, threats of secession, threats of federal coercion, and the fears of a sectional conflict over slavery all exacerbated the situation. The debate ultimately led both the United States and South Carolina governments to mobilize for a military confrontation. The compromise solution had the effect of turning public attention away from the subject of protective tariffs. While tariffs remained a political issue, public support for sectional volatility centered increasingly on slavery and territorial expansion."
Andrew Jackson, a southerner, did not agree with the tariff that started the crisis. However, as commander-in-chief and as the protector of the Constitution, he believed South Carolina had no right to nullify Federal law. He considered it a treasonous act and he openly threatened South Carolina with war. As can be imagined, this helped to inflame the state's rights advocates in South Carolina who had no desire to back down.
Andrew Jackson was forced to tone down his message. He did not want war but he also could not give in on the issue of nullification. He turned to several for advice including his Secretary of State Martin Van Buren who urged caution. He advised Jackson on ways to soften his approach which might help to build support among the other states, particularly those in the south.
In addition, Van Buren used his political connections in New York to help get support for the President. New York was one of the most powerful states in the Union and support there was crucial. Van Buren was from New York and had even briefly served as Governor of the state in 1829.
Martin Van Buren, in a report to the New York Legislature in 1833, wrote, "Even at this critical emergency in our public affairs, when so much discredit is apprehended to the sacred cause of State rights from the excesses of South Carolina, the confidence of the Committee in the correctness of that cause is strengthened by the exemplary conduct of her sister States." Van Buren eventually got the support he needed from the state legislature.
Finally, in 1833, a compromise was reached where the tariff which started the crisis was gradually reduced to pre-1828 levels. At the same time, Congress authorized the President to use force if necessary to enforce Federal law in South Carolina. The crisis was defused for a time but South Carolina would eventually lead most of the south into rebellion in 1861 almost three decades later.
Martin Van Buren shined through the whole Nullification Crisis. Andrew Jackson increasingly relied on his advice and made him his Vice-President in 1833. Further, he worked hard to make sure that Van Buren followed him into the Oval Office as the next President of the United States. The Nullification Crisis did not solve the problems which would eventually lead to the American Civil War but it did help Van Buren rise to the presidency.