The invention relates to a bacillus pumilus and its application in killing nematodes. The morphological characteristics of the Bacillus pumilus strain with nematicidal function used in the present invention are short rod-shaped, bacterium with a size of 0.58×2.1um, endophytic spores, and Gram staining is positive. On beef extract peptone solid medium, the colonies are protruding, with smooth and fine edges, milky white, and a diameter of 1.1mm to 1.8mm; on DSMZ88 improved solid medium, the colonies are smaller and white, with dry surface, rough edges and irregularities , the diameter is 1.5-2.0mm. The present invention is prepared by conventional methods. That is to say, after the Bacillus pumilus is expanded and cultivated, its insecticidal effect on Panagrellus redivivus, Meloidogyneincognita and root-knot nematode eggs is determined. The Bacillus pumilus of the present invention has good killing effect on P.redivivus nematodes, root-knot nematodes and root-knot nematode eggs, and can be developed as a nematode biocontrol agent.