An algorithm for the numerical solution of nonlinear stochastic differential equation is presented in this paper. The algorithm is derived in details herein. The realization of the algorithm is also given here. Two typical nonlinear models are studied with the algorithm and the numerical simulation demonstrated the correctness and feasibility of the algorithm.