Caffeine is a metabolite of great economic importance, especially in coffee, where it influences the sensorial and physiological impacts of the beverage. Caffeine metabolism in the Coffea species begins with the degradation of purine nucleotides through three specific N-methyltransferases: XMT, MXMT and DXMT. A comparative analysis was performed to clarify the molecular reasons behind differences in caffeine accumulation in two Coffea species, namely Coffea arabica and Coffea canephora var. robusta. Three different genes encoding N-methyltransferase were amplified in the doubled haploid Coffea canephora: CcXMT1, CcMXMT1 and CcDXMT. Six genes were amplified in the haploid Coffea arabica: CaXMT1, CaXMT2, CaMXMT1, CaMXMT2, CaDXMT1, and CaDXMT2. A complete phylogenic analysis was performed to identify specific key amino acids defining enzymatic function for each protein identified. Furthermore, a quantitative gene-expression analysis was conducted on leaves and on maturing coffee beans, simultaneously analyzing caffeine content. In the different varieties analyzed, caffeine accumulation is higher in leaves than in the coffee bean maturation period, higher in Robusta than in Arabica. In Robusta, CcXMT1 and CcDXMT gene expressions are predominant and transcriptional activity is higher in leaves than in maturing beans, and is highly correlated to caffeine accumulation. In Arabica, the CaXMT1 expression level is high in leaves and CaDXMT2 as well to a lesser extent, while global transcriptional activity is weak during bean maturation, suggesting that the transcriptional control of caffeine-related genes differs within different organs and between Arabica and Robusta. These findings indicate that caffeine accumulation in Coffea species has been modulated by a combination of differential transcriptional regulation and genome evolution.