Eighty-five years ago in Los Angeles, the Western lawman Wyatt Earp, who participated in an infamous gunfight in Tombstone, Arizona, in 1881, met with an aspiring screenwriter, Stuart Lake, and began to dictate his memoirs. Four years later, Lake sold the screen rights to Earp’s story to Fox, and the first of what would be dozens of Earp films went into production.

By now, most Americans have learned what they know of Wyatt Earp from the screen. Older viewers may have first learned of Earp in 1957 from Gunfight at the OK Corral, which starred Burt Lancaster, or, between 1955 and 1961, from the ABC television program The Life and Legend of Wyatt Earp, starring Hugh O’Brian. Younger Americans know Earp from 1993’s Tombstone, with Kurt Russell as Earp, or 1994’s Wyatt Earp, starring Kevin Costner. Harrison Ford is reportedly planning to play Earp in a film adaptation of the 2007 novel Black Hats.

Over the decades, film and television has told a consistent narrative about Earp. According to the screen, he reluctantly pinned on a badge and was drawn into the Tombstone gunfight because of his sense of duty, his unshakable commitment to law and order, and his loyalty to his brothers, also lawmen. After the gunfight resulted in the deaths of three cowboys, the dead men’s allies exacted their revenge on the Earps by shooting two of Wyatt’s brothers in the back, killing one and crippling the other. Despairing of bringing the men responsible to justice in the frontier courts, Earp, wearing a deputy U.S. marshal’s badge, hunted down and killed some of the men he deemed responsible.

Some screen treatments admit some flaws in Earp’s character, yet all of the films condone Earp’s vigilante killings. Justice, in this view, is found not in fickle courtrooms, but in the character of stalwarts such as Earp, who possess an innate sense of law and order. It is a view that suggests, to paraphrase Mao, that justice grows out of the barrel of a gun.

This view of Earp is deeply cherished in some political quarters, where it has long been invoked to rationalize extra-legal justice. In the 1930s, Earp was a symbol of the FBI’s extra-legal methods of battling organized crime; in the 1950s, he was a symbol of the extra-legal methods in the fight against communism. The echoes are loud and clear in George W. Bush’s post-9/11 vow to bring justice to terrorists “dead or alive,” a vow that rationalized a disregard for privacy, civil rights, and due process. One can hear the echoes in Arizona Sheriff Joe Arpaio’s “immigration posse,” which interdicts suspected illegal immigrants and includes among its members a Phoenix man, Wyatt Earp, who is not only the namesake of the 1880s lawman but claims to be his nephew. (This latter-day Earp had a small role in 1993’s Tombstone.) Not least of all, it resounds in National Rifle Association CEO Wayne LaPierre’s oft-repeated statement that "the only way to stop a bad guy with a gun is a good guy with a gun."

The irony is that the idealization of Earp as a good guy with a gun, an unswerving servant of law and order, is a myth. As a young man, Earp was arrested for horse theft and consorting with prostitutes. He was run out of a Texas town for trying to sell a rock painted yellow as a gold brick. He was drawn to police work not because of a devotion to the law but because, during the Gilded Age when public corruption was rampant, it was an easy source of cash. He went to court in 1896 for having refereed a fixed heavyweight championship prizefight, and as late as 1911, at age 63, he was arrested by the Los Angeles police for running a crooked card game.

The Earp myth originated not in Hollywood, but with Earp himself. Particularly following the 1896 scandal (which was the biggest sports gambling controversy until the fixed 1919 World Series) he became nationally renowned as a flim-flam man. Casting around for a way to remake his reputation, Earp stumbled upon Owen Wister’s popular 1901 Western novel, The Virginian, in which the hero participates in a gunfight and, reluctantly though necessarily, according to the author, in a vigilante hanging for horse theft. Earp seized on the interpretation. He became a fixture at Hollywood studios, befriended the early Western silent-film stars William S. Hart and Tom Mix, and dictated his Wister-inflected memoirs—with the arrest record expunged—several times over the last decades of his life. Like Jay Gatsby or Don Draper, Earp reinvented himself—and he used the newly created film industry as his tool.

Earp’s story is thus fundamental to American culture, but it is not the story with which we are familiar. It is not about the redemptive power of violence, but the redemptive power of the media. That we know Earp not as a confidence man but as a duty-bound law officer was his most enduring and successful confidence game. Somebody should make a movie about that.