Electric carsharing systems are expected to be an optional alternative to private vehicles for decreasing the urban traffic congestion and emissions. However, the temporal and spatial imbalance of the charging demand of shared electric vehicles adds to the managerial complexity of electric carsharing systems. This paper integrates mobile charging vehicles into the electric carsharing system to address this imbalance. Mobile charging vehicles can dwell at stations to provide elastic charging capacity, and thereby decrease both the waiting time of shared electric vehicles at busy stations and the investments in fixed charging piles at suburban stations. In this paper, a mixed integer linear programming formulation is proposed based on a time-space network, in which the routes of shared electric vehicles, charging schedules of shared electric vehicles, and routes of mobile charging vehicles are optimized simultaneously. Then, an algorithm based on Lagrangian relaxation is proposed. Specifically, the proposed formulation is decomposed into three independent subproblems. We propose three exact algorithms for these subproblems, and a tailored multistep repair algorithm is designed to generate feasible solutions. A case study in Hefei, China demonstrates the performance of the proposed algorithm and the effects of the number of SEVs, the number of MCVs, the number of fixed charging piles, trip component, battery capacity, and revenue on the operation of the electric carsharing system.