Multiple chaotic attractors, implying several independent chaotic attractors generated simultaneously in a system from different initial values, are a very interesting and important nonlinear phenomenon, but there are few studies that have previously addressed it to our best knowledge. In this paper, we propose a polynomial function method for generating multiple chaotic attractors from the Sprott B system. The polynomial function extends the number of index-2 saddle foci, which determines the emergence of multiple chaotic attractors in the system. The analysis of the equilibria is presented. Two coexisting chaotic attractors, three coexisting chaotic attractors and four coexisting chaotic attractors are investigated for verifying the effectiveness of the method. The chaotic characteristics of the attractors are shown by bifurcation diagrams, Lyapunov exponent spectrum and phase portraits.