Lei et al. demonstrate that a rhizobial effector NopZ is phosphorylated by a symbiotic receptor kinase, leading to its enrichment in the nuclear/perinuclear region and promoting soybean nodulation.