Monte Carlo simulations are used to study the knotting probability of circular DNA confined in a slit. We systematically vary the slit height, the width, and the contour length of the DNA molecule. We find that the trend in knotting probability with respect to slit height can be monotonic or nonmonotonic, depending on the width and contour length. The nonmonotonic trend is caused by two competing factors: the increase of the effective persistence length and the increase of segment density by slit confinement. These factors are antagonistic, in the sense that the increase in effective persistence length disfavors knot formation, whereas the increase in segment density favors the knotting probability. Our simulation results bring to light the importance of both chain length and width for slit-confined circular DNA and can be used to guide future experiments which aim to produce populations of knotted DNA through cyclization or catalyzed double-strand passage reactions in confinement.