Edaphoclimatic conditions, planting altitudes, soil, the microbiome of plants and fruits, genotypes, and postharvest processing are variables that contribute to the chemical and sensory quality of the coffee. Thus, the objective of this study was to evaluate the impacts of planting altitude and fermentation of fruits on the chemical and sensory quality of the coffee using nuclear magnetic resonance (NMR) and linear discriminant analysis (LDA). Cherry coffees were harvested in 8 points of altitudes between 826 and 1078.08 meters. A completely randomized design with 8 planting altitudes, 5 fermentation processes, and 5 repetitions was performed. Lipids, trigonelline, citrate, and malate were the compounds that most contribute to the chemical discrimination of coffee in the altitudes below 969 m. While, in the high altitudes (> 1000 m), this discrimination was due to the HMF, quinic acid, caffeine, and formic acid and the global notes of coffee drink were higher than 80 points. In fermented coffee, the LDA of the chemical data indicates the formation of ve clusters, showing how the compounds can suffer changes depending on the form of processing used in coffee. The best score was observed in samples of 1078.08 m and dry fermentation and only in 969 m was observed signi cant difference between spontaneous fermentation and induced fermentation. Thus, coffee sensory scores were dependent on planting and fermentation methods and NMR and LDA techniques proved to be important in chemical and sensory discrimination of coffees.