A direct formulation of the boundary element method using complex variable functions for two-dimensional elastoplastic analysis has been developed. Based on the initial stress approach and complex potential fundamental solutions, the method simplified the computer program and reduced the input data and the order of the equation system greatly, the function of the computer program has been improved and the singular solution behaviour in the yield region near the boundary is eliminated. Two numerical examples have shown that the method can be used in practical applications of elastoplastic analysis in engineering.