We report carrier concentration-dependence of terahertz emission from magnesium doped indium nitride (InN:Mg) films. Near the critical concentration (nc∼1×1018 cm−3), the competition between two emission mechanisms determines the polarity of terahertz emission. InN:Mg with n>nc exhibits enhanced positive polarity terahertz emission compared to the undoped InN, which is due to the reduced screening of the photo-Dember field. For InN:Mg with n<nc, the polarity of terahertz signal changes to negative, indicating the dominant contribution of the surface electric field due to the large downward surface band bending within the surface layer extending over the optical absorption depth.