There is a persistent story that, on the White House lawn, Thomas Jefferson personally executed a prisoner for treason. Some sources name the victim as a North Carolina man called Rodney Cox. We have no evidence that this "execution" ever occurred; no such event is mentioned in Jefferson's papers, or in contemporary newspaper accounts. The story, as far as we know, originated entirely with the movie Swordfish (2001), where it is mentioned by John Travolta's character, Gabriel Shear.1
The true origins of the story are a puzzle. Certain actual events could have been (severely) misunderstood or mistaken for a "Jefferson execution":
In 1778, Jefferson was involved in drafting a "Bill to Attaint Josiah Philips and Others." The bill ordered the trial and provided for the execution of the murderer and bandit Josiah Philips for treason. Philips was eventually convicted of robbery, not treason.2
In 1804, while serving as Jefferson's vice president, Aaron Burr killed Alexander Hamilton in their famous duel.
Neither of the above events seems very plausible as a possible source for the story in question. Unless reliable evidence surfaces, we can only explain this story as a complete fabrication by the scriptwriters of Swordfish.