Roots are important contributors to plant development, functioning to provide nutrients and water for plant growth. However, roots and their functions are often simplified in Earth system models, which limit the feedback of root foraging strategy on plant productivity, and their impacts on the carbon cycle. The goal of this study is to introduce a new method to resolve the vertical structure of roots over time. The method allows plasticity of rooting depth distribution under nonuniform profiles of water and nitrogen, which influences aboveground dynamics. The dynamic root model optimizes root distribution for both water and nitrogen uptake but gives priority to plant water demands. I implement this new method in the Energy Exascale Earth System model. The resulting root distribution maintains agreement with observations in most ecosystems and marginally improves the gross primary productivity estimated by the model, compared to satellite observations. Increases in gross primary productivity are simulated in desert and boreal ecosystems. However, the model does not capture deep roots in the dry tropics, and therefore, productivity losses are observed in parts of the Amazon and the African savannah. I discuss details of the model algorithm, along with some sensitivity studies that shed light on the model behavior in water‐limited ecosystems. The study shows that additional model processes, such as climate dependent root depth, root hydraulics, root form and function, and better nitrogen uptake, should be considered to improve the root water uptake in the Energy Exascale Earth System Land Model (ELM).