The origins of gas giant planets orbiting close to their host stars ("hot Jupiters") remain a mystery despite more than a quarter-century of study 1 . The atmospheric compositions of these planets are highly sought after to provide insight to their formation location in protoplanetary disks, how they migrated to be so close to their host stars, and the relative role of solid versus gas accretion during their assembly 2 . However, simultaneous, bounded constraints on both carbon and oxygen abundances, which are key for understanding giant planet formation 3,4,5,6 , have been elusive 7,8,9 . Here, we report precise abundance measurements of both water and carbon monoxide in a hot Jupiter atmosphere via ground-based, high resolution spectroscopy. From these constraints on the primary carbon-and oxygenbearing molecules, paired with upper limits on other minor volatile elemental carriers, we are able to derive the atmospheric elemental metal enrichment (metallicity) and the carbonto-oxygen ratio (C/O). The inferred atmospheric metallicity is slightly sub-stellar (-0.48 +0.15 −0.13