The production area of coffee beans becomes a brand name, which gives reputations for the products, which is related to the price. This leads to room for mislabeling the products by unscrupulous market dealers. A rapid and easy method for the analysis of trace-element composition of coffee beans, which could be a good indicator of their production area, was studied in the present work. Coffee beans of 6 different regions (Brazil, Colombia, Vietnam, Indonesia, Tanzania, Guatemala) were analyzed by using a highly sensitive X-ray fluorescence spectrometer with three dimensional polarization optics. The experimental conditions were optimized so as to analyze 6 elements (Mn, Fe, Ni, Rb, Sr, Ba) in coffee beans, and linear calibration curves were obtained for the quantitative analysis of those elements. The analytical results were used in principal-component analysis to classify the coffee beans according to the geographical origin, which results in a successful characterization of the 6 production areas. It is found that roasted beans can be used with the same criterion as their green beans. Consequently, a rapid and easy way for the characterization of the geographic origin of coffee beans has been established in this study.