Uncertain demand may exacerbate the imbalance of the supply–demand for a one-way carsharing system and complicate vehicle relocation decisions. To consider the effect of the uncertainty, this study proposes a two-stage stochastic nonlinear programming model, integrating long-term and short-term decisions and maximizing the profit of the carsharing companies. Specifically, in the first stage, tactical decisions of fleet sizing and initial vehicle distribution are determined before the realization of the uncertain demand. Operational decisions of both operator-based and user-based relocation are optimized in the second stage. Moreover, this paper first studies the user-based relocation incentives, which affect the distribution of uncertain demand with an endogenous relationship. A learning-embedded optimization method is introduced to learn such a distribution, enabling the decision-making optimization model to achieve higher performance under the guidance of the demand uncertainty. Second, we envision an equitable relocation issue that considers an uneven distribution of the unsatisfied demand with two different equity criteria measured from the aspects of stations and OD pairs, respectively. Third, the large problem scale, the nonlinear objective function and constraints, and the endogenous demand uncertainty constitute the nontrivial challenges to the feasible solution. For solving the problem efficiently, we linearize the nonlinear terms and develop a dedicated two-phase solution algorithm with a learning-embedded trust-region method in phase I to solve the continuous relaxation problem and a mixed-integer linear programming guided iterative rounding in phase II to obtain the integer solutions of carsharing operations. The solution algorithm adaptively bridges the learning and optimization process via the trust-region method with flexible sample generation. Finally, we conduct numerical experiments based on a real-world one-way carsharing system in Beijing to demonstrate the effectiveness and applicability of the proposed method and reveal some insights for the carsharing service.