Many cellular condensates are heterotypic mixtures of proteins and RNA formed in complex environments. Magnesium ions (Mg2+) and ATP can impact RNA folding, and local intracellular levels of these factors can vary significantly. However, the effect of ATP:Mg2+ on the material properties of protein-RNA condensates is largely unknown. Here, we use an in vitro condensate model of nucleoli, made from nucleophosmin 1 (NPM1) proteins and ribosomal RNA (rRNA), to study the effect of ATP:Mg2+. While NPM1 dynamics remain unchanged at increasing Mg2+ concentrations, the internal RNA dynamics dramatically slowed until a critical point, where gel-like states appeared, suggesting the RNA component alone forms a viscoelastic network that undergoes maturation driven by weak multivalent interactions. ATP reverses this arrest and liquefies the gel-like structures. ATP:Mg2+ also influenced the NPM1-rRNA composition of condensates and enhanced the partitioning of two clients: an arginine-rich peptide and a small nuclear RNA. By contrast, larger ribosome partitioning shows dependence on ATP:Mg2+ and can become reversibly trapped around NPM1-rRNA condensates. Lastly, we show that dissipative enzymatic reactions that deplete ATP can be used to control the shape, composition, and function of condensates. Our results illustrate how intracellular environments may regulate the state and client partitioning of RNA-containing condensates.