Congenital human cytomegalovirus (HCMV) infection occurs in ~0.64% of infants born each year in the United States and is the leading nongenetic cause of childhood neurodevelopmental disabilities. No licensed HCMV vaccine is currently available. Natural immunity to HCMV in women before pregnancy is associated with a reduced risk of fetal infection, suggesting that a vaccine is feasible if it can reproduce immune responses elicited by natural infection. On the basis of this premise, we developed a whole-virus vaccine candidate from the live attenuated AD169 strain, with genetic modifications to improve its immunogenicity and attenuation. We first restored the expression of the pentameric gH/gL/pUL128-131 protein complex, a major target for neutralizing antibodies in natural immunity. We then incorporated a chemically controlled protein stabilization switch in the virus, enabling us to regulate viral replication with a synthetic compound named Shield-1. The virus replicated as efficiently as its parental virus in the presence of Shield-1 but failed to produce progeny upon removal of the compound. The vaccine was immunogenic in multiple animal species and induced durable neutralizing antibodies, as well as CD4+ and CD8+ T cells, to multiple viral antigens in nonhuman primates.