The current source inverter (CSI) has become the main grid-connected interface of distributed generation systems due to its advantages, such as boost capability, current controllability, and short-circuit protection capability. However, in weak grids, the grid-connected CSI that uses a phase-locked loop to achieve grid voltage synchronization has problems, such as instability in the fundamental positive-sequence voltage phase detection at the point of common coupling and instability in the current loop control, which seriously hamper the promotion and application of the CSI and its interconnected systems. For this reason, this paper proposes a sliding mode observer-based phase-locking strategy for the CSI. The strategy proposes a sliding mode observer for grid voltage phase detection, so that the grid current can directly follow the grid voltage, solving the problem of inconsistency or distortion between the voltage phase of the point of common coupling and the grid voltage phase in weak grids. On this basis, the grid impedance is regarded as part of the CL filter, and a robust parameter design method is proposed for the grid current closed-loop control in weak grids, which achieves robust operation of a CSI in weak grids. Finally, an experimental platform for a single-phase grid-connected CSI is built to verify the effectiveness and feasibility of the proposed scheme.