Calculations are presented of the evolution of the distribution of carbon monoxide and its photodissociation products in detached circumstellar envelopes surrounding evolved late-type stars that have undergone intense mass loss. The CO molecules are more readily photodissociated in a detached shell than in an attached envelope because of the less effective shielding by H2 and CO molecules and by the dust of the dissociating radiative field. At early stages of its evolution, the CO distribution follows closely the hydrogen distribution in the detached shell, because CO photodissociation is not significant except in the thin outermost layer of the shell. At the later stages, the CO shell occupies only the innermost layer of the detached shell because of the more effective CO photodissociation in the outer layer that occurs unless the gas is extremely clumpy. Observations of the CO photodissociation products, C and especially C+, are needed for the determination of the actual size of the detached shell. A comparison of the calculations and observations of the widths of the CO shells indicates a clumpy structure of the circumstellar gas, which is consistent with the patchy appearances and rectangular profiles of the optically thick CO emission from the shells. The carbon ionization ratio is a potentially useful diagnostic of the degree of clumpiness in the detached shells. Its determination through observations will be important in refining our understanding of the role of photodissociation in the detached circumstellar envelopes.