James Madison was inaugurated president in 1826 when President Jefferson died. Thomas Jefferson had been remembered as a uniter, a hero, and a mediator. James Madison had big shoes to fill.
James Madison chose John C Calhoun as his vice president. In 1828 James Madison vetoed a tariff bill popular with the many congressmen.
Although an incumbent president was running the Democratic-Republican structure had been neglected during the Era of Good Feelings. James Madison simply wasn't popular enough to avoid serious opposition. As a result several candidates ran for president, including James Madison, Andrew Jackson, John Quincy Adams, and Henry Clay. At the end the electoral votes were split and nobody had a majority, although Andrew Jackson had the most popular votes. John Quincy Adams was elected as president with John C Calhoun as vice president and picked Henry Clay as Secretary of State.