We consider the cross section for one-particle inclusive production at high transverse momentum in hadronic collisions. We present the all-order resummation formula that controls the logarithmically-enhanced perturbative QCD contributions to the partonic cross section in the threshold region, at fixed rapidity of the observed parton (hadron). The explicit resummation up to next-to-leading logarithmic accuracy is supplemented with the computation of the general structure of the near-threshold contributions to the next-to-leading order cross section. This next-to-leading order computation allows us to extract the one-loop hard-virtual amplitude that enters into the resummation formula. This is a necessary ingredient to explicitly extend the soft-gluon resummation beyond the next-to-leading logarithmic accuracy. These results equally apply to both spin-unpolarized and spin-polarized scattering processes.