Although great efforts have been made to locate molecular gas--the material out of which stars form--in the early Universe, there have been only two firm detections at high redshift. Both are gravitationally lensed objects at redshift z approximately = 2.5 (refs 9-14). Here we report the detection of CO emission from the radio-quiet quasar BR1202 - 0725, which is at redshift z = 4.69. From the observed CO luminosity, we estimate that almost 10(11) solar masses of molecular hydrogen are associated with the quasar; this is comparable to the stellar mass of a present-day luminous galaxy. Our results suggest that BR1202 - 0725 is a massive galaxy, in which the gas is largely concentrated in the central region, and that is currently undergoing a large burst of star formation.