We propose an efficient method for solving the Cauchy problem for an ordinary differential equation with multiple poles of integer order. The method allows one to carry out an end-to-end calculation through a pole both for a single pole and in the case of a chain of poles. The method uses a special algorithm for finding the multiplicity of each pole. This multiplicity is used to define a generalized reciprocal function for which the $$K$$ -tuple pole of the original function is a simple zero. The calculation of such a zero is not difficult, and therefore, the proposed method allows obtaining high accuracy even near the poles. After passing this zero, the calculation of the original function is resumed. The application of this method on a sequence of poles permits one to find a numerical solution simultaneously with an a posteriori estimate of the error. The method is illustrated by test examples.