The portrait belonged, in succession, to Francis Preston Blair, Blair's son in law Rear Admiral Phillips Lee and Lee's wife Elizabeth Blair Lee. Her son Blair Lee sold it to M. Knoedler and Co. in 1932 or 34 who in turn sold it to the A.W. Mellon Foundation in 1934. The foundation gave it to the National Gallery in 1942. -- NPG, 2016.
The 2017 museum label gives a more expansive description of this painting.
Andrew Jackson's life was colored by struggle, conflict, and aggression. The orphan of impoverished immigrants, he was the only American president to have been a prisoner of war or to have killed a man in a duel. After serving as a general in the U.S. military during the Battle of New Orleans in 1815, he became a national hero.During Jackson's presidency, he signed the Indian Removal Act into law, defeated the National Bank through the power of the veto, and threatened to use military force to preserve the Union when South Carolina challenged the federal government. Once viewed as a symbol of the country's expansive democracy, Jackson is now a controversial figure for his uncompromising nationalism and punitive Indian policies.Thomas Sully only painted Jackson from life on two occasions, but he made many portraits of him. This work was a gift from Jackson to his friend Francis Preston Blair.
This or another version of Sully's Portrait appears to be the basis of Jackson's portrait on the $20 bill.
Wikipedia remarks that:
"Jackson first appeared on the $20 bill in 1928. Although it coincides with the 100th anniversary of Jackson's election as president, it is not clear the reason the bill was switched from Grover Cleveland to Andrew Jackson. According to the U.S. Treasury, 'Treasury Department records do not reveal the reason that portraits of these particular statesmen were chosen in preference to those of other persons of equal importance and prominence.'
The placement of Jackson on the $20 bill may be a historical irony; as President, he vehemently opposed both the National Bank and paper money and made the goal of his administration the destruction of the National Bank. In his farewell address to the nation, he cautioned the public about paper money."