The all-fiber optic current sensor is applied to realize the measurement of the leakage current of ships. The analytical model is established in a two-dimensional cartesian coordinate system. The magnetic field distribution of the weak current of a single long straight wire and the leakage current formed by two wires are modeled and simulated, respectively. The correctness of the analytical model is verified by the finite element method. The conditions of the formula application of the all-fiber current sensor are studied. It is determined that no magnetic field mutation, sensing fiber coil closure, transmission fiber insensitive to the magnetic field, and stable operation of the Verdet constant are the prerequisites for the combination of the Faraday effect and Ampere loop theorem. Finally, the experiments are conducted to prove the feasibility of the proposed method. The sensor achieves an accuracy of 1% and good linearity when the leakage current is from 1mA to 99mA.