From Wikipedia, the free encyclopedia - View original article
Beaner is a slang term, widely regarded as derogatory, that refers to Mexicans or also to Hispanic people in general, used too for Hispanic-ancestry's people. The term originates from the prevalence of pinto beans and other beans in Mexican cuisine.
According to The Historical Dictionary of American Slang, the word was first seen in print in 1965, although the term has reportedly been in use at least since the 1940s (perhaps having evolved from previous slurs such as "bean-eater" and "bean-bandit" that were in use since as far back as the 1910s.) 
Although the word is generally considered pejorative, its usage is not always overtly offensive and can be fairly benign depending on the context (similar to the term "frog" for a French person.) Though perhaps once considered strictly offensive, it appears that the term may be going through a phase of melioration, where the negative connotation of an ethnic slur is "reclaimed" by those against whom it is directed and used in a neutral or even positive manner.