In July, 1782, Hamilton was appointed to the Congress of the Confederation, representing the state of New York. He resigned from Congress in 1783 and set up a law practice. In 1784, he founded the Bank of New York. He continued to exert an influence on national politics, co-authoring the Federalist Papers with John Jay and James Madison, and helping found and lead the Federalist political party, advocating for a much stronger central government than that provided by the Articles of Confederation. Hamilton played a key role in creating the Constitution, which replaced the Articles in 1787. He served as the first Secretary of the Treasury (1789-1795) in the cabinet of George Washington, and essentially established our national monetary system.
In 1789, Hamilton began a clandestine correspondence with British agent Major George Beckwith (who had been involved with Benedict Arnold in his treason years earlier). Unlike Arnold, Hamilton didn't betray his nation for financial reward, but his actions were nevertheless deceptive and dishonest, even if he believed they were in the best interest of the country.
Hamilton (addressed by Beckwith as "7" to protect his identity) selectively revealed secret cabinet discusssions to Beckwith, and deliberately misinformed President Washington concerning the conversations he had with the British agent, all with the apparent objective of guiding U.S. policy in the direction that he envisioned, overshadowing the ideas of some of his contemporaries, most notably, Thomas Jefferson.
Much of the correspondence between Hamilton and Beckwith is presented as part of the Founder's Online project of the National Archives.
As Professor Julian Boyd, author of Number 7: Alexander Hamilton's Secret Attempts to Control American Foreign Policy (Princeton University Press, 1964) puts it, these secret conversations,
form, in fact, a part of the pattern of Hamilton's sustained effort to guide the conduct of American foreign policy that began in the autumn of 1789 and culminated in the treaty of 1794 (between the United States and British).
The Federalists were opposed by the Democratic-Republicans, led by Thomas Jefferson. The two parties contested in the election of 1796, but presidential selection was very different then than it is today. A candidate did not run for president with a vice presidential running mate. Instead, electors cast two votes for two different men. The winner became president and the runner-up, the vice president, even if they were from different political parties. This made a tie very likely, as all the electors for each party were likely to cast their two votes for the same two men.
The parties dealt with this by arranging for all their electors to cast one of their votes for the party's top choice, and all but a few to cast their second vote for the party's second choice, avoiding a tie. But there was disagreement within the Federalist party as far as who their top choice was. Other Federalists wanted John Adams as President, and Thomas Pinckney as Vice President and planned to vote accordingly. In an effort to keep John Adams from becoming president, Hamilton urged some electors to vote for Jefferson and Pinckney, rather than Adams and Pinckney, but not because he wanted Jefferson in either role. He intended to direct enough votes from Adams to Jefferson that Pinckney would end up with the most, Adams with the second most. The plan backfired and ultimately John Adams became president, Thomas Jefferson, Vice-President and Thomas Pinckney was elected to nothing.
In July of 1798, Hamilton was commissioned Major General when war threatened to break out with France, serving for almost two years, though war was averted. John Adams, elected in 1796 despite Hamilton's machinations, was up for re-election in 1800. Hamilton again schemed, urging support for Charles Cotesworth Pinckney (brother of Thomas Pinckney) over John Adams, going so far as writing and circulating a pamphlet entitled Letter from Alexander Hamilton, Concerning the Public Conduct and Character of John Adams, Esq. President of the United States, a deeply critical attack.
Though he distributed the pamphlet solely among his fellow Federalists, and his intention was only to elect Pinckney and relegate Adams to Vice-President, it backfired even more dramatically than his 1796 scheming. A copy fell into the hands of the Democratic-Republicans, who published it. Adams' reputation was hurt and Jefferson and Aaron Burr tied for first place in the election. The tie was broken by the House of Representatives. Hamilton used his influence to get Jefferson, a man with whom he had publicly disagreed on many occasions and the leader of the opposition party, elected over Burr, a member of his own party. Four years later, he helped defeat the Burr campaign once more when Burr tried to become governor of New York.
Aaron Burr and Alexander Hamilton had been on friendly terms for years, but after fifteen years of having every political aspiration thwarted by Hamilton, Burr was seething with anger and itching for revenge. The final straw came in the form of letters published in the Albany Register, outlining Hamilton's opposition to Burr, and rumors of even more savage attacks on Burr's character alleged to have been delivered at a dinner party. Ultimately, Burr challenged Hamilton to a duel. On July 11, 1804, Hamilton was mortally wounded and he died the following afternoon in extreme pain at the age of 47.
Hamilton's remains are buried in the graveyard of Trinity Church in New York City, the final resting place of several other key figures in U.S. history, including Horatio Gates and John Peter Zenger. Hamilton's grave is the most popular tourist attraction in the cemetery, even more so since the release of the Broadway sensation Hamilton.