A new alkaloid named methyl 2-(3,4-dihydro-2H-pyrrol-5-yl)acetate (1), together with 24 known compounds, was isolated from the acetone extract of the fruiting bodies of Ramaria stricta. Their structures were elucidated on HR-ESI-MS and extensive 1D and 2D NMR spectroscopy. The nematocidal assay showed that three compounds, benzoic acid, 3-hydroxy-2-methylbenzaldehyde, and 4-(hydroxy)benzylbenzoic acid, exhibited a certain activity against Panagrellus redivivus.