Few-layer TaSe2 nanosheets are prepared by liquid-phase exfoliation, the nonlinear optical response of which is researched based on the spatial self-phase modulation effect.