  The nonattractor evolution in ultra-slow-roll (USR) inflation results in the
amplification of superhorizon curvature perturbations and then induces a strong
and detectable stochastic gravitational wave background. In this letter, we
search for such a stochastic gravitational wave background in data from the
third LIGO-Virgo observing run and place constraints on the USR inflationary
models. The $e$-folding number of the USR phase are constrained to be $\Delta N
\lesssim 2.9$ at the 95% confidence level and the power spectrum of curvature
perturbations amplified during the USR phase is constrained to be
$\log_{10}P_{R\mathrm{p}}<-1.7$ at the scales $2.9\times10^5 ~\mathrm{pc^{-1}}
\lesssim k \lesssim 1.7\times10^{11}~\mathrm{pc^{-1}}$. Besides, we forecast
the ability of future experiments to constrain USR inflation, and find
$P_{R\mathrm{p}}\lesssim 10^{-3.6}$ for LISA and Taiji,
$P_{R\mathrm{p}}\lesssim 10^{-3.3}$ for Cosmic Explore and Einstein Telescope,
$P_{R\mathrm{p}}\lesssim 10^{-5.5}$ for DECIGO and Big Bang Observer and
$P_{R\mathrm{p}}\lesssim 10^{-5.2}$ for Square Kilometre Array.
