In the 17th century Spanish-speaking Mexicans adopted the Aztec name for spicy peppers: chilli (Nahuatl language). At that time they modified it to its current spelling of chile, this moniker has also been adopted by the Spanish-language influenced American Southwest.
Exported and anglicized in the 17th century it ironically appears again spelled as chilli in English texts of that age. Americans simplified this to chili, with a single "l". In the early 1800s the popular frontier dish "chili" was concocted and the spice blend marketed to make this favorite at home was called chili powder. Today it contains a blend of spices which often includes cumin, oregano, paprika and one or two different types of ground chile peppers.
In culinary circles in the U.S. it has become practice to defer to the Spanish spelling when referring to a single pepper variety. Chili with an "i" ending is reserved for the spice blend.