Gallatin moved to New York City in 1828 and became president of the National Bank of New York the following year. He attempted to persuade President Jackson to recharter the Second Bank of the United States, but Jackson vetoed a recharter bill and the Second Bank lost its federal charter in 1836. In 1831, Gallatin helped found New York University, and in 1843 he was elected president of the New–York Historical Society. In the mid-1840s, he opposed President James K. Polk's expansionist policies and wrote a widely-read pamphlet, "Peace with Mexico", that called for an end to the Mexican–American War.