An acyl coenzyme A hydrolase (thioesterase II) has been purified to near homogeneity from lactating rat mammary gland. The enzyme is a monomer of molecular weight 33,000 and contains a single active site residue. The enzyme is specific for acyl groups, as acyl-CoA thioesters, containing eight or more carbon atoms and can also hydrolyze oxygen esters. Thioesterase II is capable of shifting the product specificity of rat mammary gland fatty acid synthetase from predominately long chain fatty acids (C14, C16, and C18) to mainly medium chain fatty acids (C8, C10, and C12). Thioesterase II can restore the capacity for fatty acid synthesis to fatty acid synthetase in which the thioesterase component (thioesterase I) has been inactivated with phenylmethanesulfonyl fluoride or removed by trypsinization. No evidence was found of significant levels of thioesterase II in lactating rat liver. The presence of thioesterase II in the lactating mammary gland and the ability of the enzyme to hydrolyze acyl-fatty acid synthetase thioesters of intermediate chain length, are indicative of a major role for this enzyme in the synthesis of the medium chain fatty acids characteristic of milk fat.