Thioacylation is one of a handful of reversible covalent protein modifications, but the enzymes responsible for addition and removal of long chain fatty acids from protein cysteine residues in vivo have not yet been identified. The alpha subunits of some heterotrimeric G proteins cycle between thioacylated and deacylated states in a receptor-regulated fashion. We have identified, purified, and characterized an enzyme acyl-protein thioesterase that deacylates Galpha proteins and at least some other thioacyl protein substrates, including Ha-RAS. The action of this enzyme on thioacylated heterotrimeric Gs is regulated by activation of the G protein. Although native and recombinant acyl-protein thioesterases act as both acyl-protein thioesterases and lysophospholipases in vitro, we demonstrate by transfection that the enzyme can accelerate the turnover of thioacyl groups on Gsalpha in vivo.