Nonrelativistic string theory is described by a sigma model with a relativistic worldsheet and a nonrelativistic target spacetime geometry, that is called string Newton–Cartan geometry. In this paper we obtain string Newton–Cartan geometry as a limit of the Riemannian geometry of general relativity with a fluxless two-form field. We then apply the same limit to relativistic string theory in curved background fields and show that it leads to nonrelativistic string theory in a string Newton–Cartan geometry coupled to a Kalb–Ramond and dilaton field background. Finally, we use our limiting procedure to study the spacetime equations of motion and the T-duality transformations of nonrelativistic string theory. Our results reproduce the recent studies of beta-functions and T-duality of nonrelativistic string theory obtained from the microscopic worldsheet definition of nonrelativistic string theory.