The exact origins of the use of a checkered flag to end races are lost in history, although there are many theories. A possible though unlikely theory is that horse races during the early days of the settlement of the American Midwest were followed by large public meals and that to signal that the meals were ready and racing should come to an end, a checkered tablecloth was waved.
Another origin theory claim is that the checkered flag's earliest known use was for 19th century bicycle races in France.
A more likely explanation is that a high-contrast flag would be more conspicuous against the background of a crowd, especially when early races were run on dirt tracks (and therefore dust reduced the driver's visibility).
The earliest known photographic record of a checkered flag being used to end a race was from Long Island, New York in 1904 at the inaugural Vanderbilt Cup race. Some historians dispute the dating of this photograph, and attribute it to the Vanderbilt races of 1906 or 1908.
A 2006 publication "The Origin of the Checker Flag - A Search for Racing's Holy Grail", written by historian Fred Egloff and published by the International Motor Racing Research Center at Watkins Glen, traces the flag's origin to one Sidney Waldon, an employee of the Packard Motor Car Company, who in 1906 devised the flag to mark "checking stations" (now called "checkpoints") along the rally-style events of the Glidden Tour.
In 1980, USAC starter Duane Sweeney started a tradition at the Indianapolis 500 by waving twin checkered flags at the end of the race. Previous starters had only used a single flag. Sweeney also marked the first use of twin green flags at the start of the race.