The magnetic substate-selective single-electron-capture cross sections in collisions of N 5+ with He and H 2 are calculated using the two-center atomic orbital close-coupling method, and the polarization of emitted radiation from the excited state of N 4+ is investigated for projectile energies between 1.2 and 7 keV/u. The polarization degrees for the 3p 2 P 3/2 -3s 2 S 1/2 transition of N 4+ (3p 2 P 3/2 ) produced in N 5+ + He and N 5+ + H 2 electroncapture collisions are in general agreement with the experimental measurements. It is found both experimentally and theoretically that there exists a large difference between the polarization degrees of this radiation resulting from the N 5+ + He and N 5+ + H 2 electron-capture collisions, namely, ∼0.25 and ∼0, respectively. By studying the time evolution of electron-capture dynamics in the two systems we have found that this difference is caused mainly by the difference in the interactions in the two systems at relatively small internuclear distances, consistent with the molecular picture of the collision dynamics.