We present a first attempt to determine nucleon–nucleon potentials in the parity-odd sector, which appear in the P 1 1 , P 0 3 , P 1 3 , P 2 3 – F 2 3 channels, in N f = 2 lattice QCD simulations. These potentials are constructed from the Nambu–Bethe–Salpeter wave functions for J P = 0 − , 1 − and 2 − , which correspond to the A 1 − , T 1 − and T 2 − ⊕ E − representation of the cubic group, respectively. We have found a large and attractive spin–orbit potential V LS ( r ) in the isospin-triplet channel, which is qualitatively consistent with the phenomenological determination from the experimental scattering phase shifts. The potentials obtained from lattice QCD are used to calculate the scattering phase shifts in the P 1 1 , P 0 3 , P 1 3 and P 2 3 – F 2 3 channels. The strong attractive spin–orbit force and a weak repulsive central force in spin-triplet P-wave channels lead to an attraction in the P 2 3 channel, which is related to the P-wave neutron paring in neutron stars.