I believe is was divine intervention.
Someone tried and their gun misfired. Jackson actually had to be pulled off his attacker. He was known for being very combative.
He survived another attempt on his life earlier and carried the ball around in him the rest of his life.
Andrew Jackson’s would-be assassin fired not one but TWO flintlock pistols at him at point blank range and BOTH failed to flash in the pan. He would have beaten his attacker to death were he not restrained.
Earlier, Jackson had withstood the fire of his antagonist on the dueling field; the .70 caliber ball struck a rib then deflected. He staggered but then stood upright & fired; the hammer fell to half-cock but Jackson recocked and fired, killing his opponent.
How many U.S. Presidents can be quoted, “Oh, I do believe he pinked me, but I would have killed him even if he had shot me through the brain!”