The two-component compound formed by codeine and cyclopentobarbital was produced by grinding techniques and by evaporation from alcoholic solutions. The cocrystal nature of this phase was established unequivocally by single crystal X-ray structure determination. The asym-metric unit contains one formula unit. In the cyclopentobarbital molecule, the cyclopentenyl ring is disordered over two positions related by a rotation of approximately 180° about its C‒C bond to the pyrimidine ring. The two NH groups of the cyclopentobarbital molecule form N—H···N and N—H···O bonds to piperidine and hydroxyl groups, respectively, belonging to different codeine molecules. In addition, the hydroxyl and methoxy groups of neighboring codeine molecules are linked by O—H···O interactions, resulting H-bonded framework structure of codeine and cyclo-pentobarbital molecules. The cocrystal was also characterized by thermal analysis, X-ray powder diffraction and IR spectroscopy.