Ammonium assimilation in E. coli is regulated by two paralogous proteins (GlnB and GlnK), which orchestrate interactions with regulators of gene expression, transport proteins and metabolic pathways. Yet how they conjointly modulate the activity of glutamine synthetase (GS), the key enzyme for nitrogen assimilation, is poorly understood. We combine experiments and theory to study the dynamic roles of GlnB and GlnK during nitrogen starvation and upshift. We measure time-resolved in vivo concentrations of metabolites, total and post-translationally modified proteins, and develop a concise biochemical model of GlnB and GlnK that incorporates competition for active and allosteric sites, as well as functional sequestration of GlnK. The model predicts the responses of GS, GlnB and GlnK under time-varying external ammonium level in the wild type and two genetic knock-outs. Our results show that GlnK is tightly regulated under nitrogen-rich conditions, yet it is expressed during ammonium run-out and starvation. This suggests a role for GlnK as a buffer of nitrogen shock after starvation, and provides a further functional link between nitrogen and carbon metabolisms.