||Among various organic wastes, shrimp shell powder (SSP) was the most suitable carbon/nitrogen source for producing antinematode compounds (ANCs) via Bacillus veleznesis RB.EK7 fermentation. The fermentation process for the enhancement of antinematode activity was investigated. B. veleznesis RB.EK7 produced the highest antinematode activity in the medium containing 0.8% SSP with an initial pH of 6.5–7.0, and fermentation was performed at 35–37 °C with a saking speed of 150 rpm for 72 h. Targeting ANCs were purified from the fermented culture broth and identified as thymine (1) and hexahydropyrrolo [1,2-a]pyrazine-1,4-dione (2) based on nuclear magnetic resonance (NMR) and mass spectra analysis and were compared to those of the reported compounds. Notably, for the first time, these compounds were found as novel ANCs. Thymine (1) demonstrated a potential nematicidal effect with near 100% mortality of second-stage juvenile (J2) nematodes and anti-egg hatching effects of 70.1%, while hexahydropyrrolo [1,2-a]pyrazine-1,4-dione showed moderate antinematode activities with 64.2% mortality of J2 nematodes and anti-egg hatching effects of 57.9%. The docking study coupled with experimental enzyme inhibition results indicated that the potent nematicidal effect of these compounds may be possibly due to the inhibition of the targeting enzyme acetylcholinesterase. The data of this study suggest that SSP can be potentially reused for the eco-friendly production of ANCs for the management of black pepper nematodes.