The electronic structures and electron g factors of InSb1-sNs and GaAs1-sNs nanowires and bulk material under the magnetic and electric fields are investigated by using the ten-band k∙p model. The nitrogen doping has direct and indirect effects on the g factors. A giant g factor with absolute value larger than 900 is found in InSb1-sNs bulk material. A transverse electric field can increase the g factors, which has obviously asymmetric effects on the g factors in different directions. An electric field tunable zero g factor is found in GaAs1-sNs nanowires.