The unique ability of photoactive proteins to capture and use energy from a photon of light depends on the chromophore, its linkage to the protein, and the surrounding protein environment. To understand the molecular mechanisms by which a chromophore and protein interact to undergo a light cycle, we are studying photoactive yellow protein (PYP), a 14-kDa water-soluble photoreceptor from Ectothiorhodospira halophila with a photocycle similar to that of sensory rhodopsin. Here, we report the cloning and sequencing of the pyp gene and the chemical identification of both the chromophore and its covalent linkage to the protein. Elemental composition data from high-resolution mass spectrometry of a proteolytically derived chromopeptide, pH titrations and UV-visible spectroscopy of the protein-bound and chemically released chromophore, and fragmentation mass spectrometry of the liberated chromophore amide were combined with results from the 1.4-A-resolution protein crystal structure to identify the chromophore in PYP as a 4-hydroxycinnamyl group covalently bound to the sole cysteine residue via a thioester linkage. While 4-hydroxycinnamate is a metabolic product of the phenylpropanoid pathway and a key molecule in plant stress response, this is the first report of covalent modification of a protein by this group. In the dark (yellow) state of PYP, the protein stabilizes the chromophore as the deprotonated phenolate anion. By combining our biochemical characterization of the chromophore with other published observations, we propose a chemical basis for the photocycle: following the initial absorption of a photon, the photocycle of PYP involves protonation of the chromophore to a neutral phenol form corresponding to the observed photobleached intermediate.