The content of bismuth and nitrogen can strongly affect the physical properties of III–V semiconductors and have a decisive impact on their performance in applications. Using first-principles calculations, we systematically study the geometry, electronic and optical properties of [Formula: see text] aligned in special quasirandom structures (SQS). The incorporation of a small amount of N and Bi can effectively tune the band gap of pristine InP. For the same number of P atoms being substituted, co-doping mode reduced the bond length disparity and the corresponding formation energy was also smaller than that of only nitrogen doped. Since the bismuth doped increases spin-orbit splitting energy [Formula: see text], the Auger recombination and intervalence band absorption (IVBA) processes are found to be suppressed for quaternary [Formula: see text] (4.40 [Formula: see text]m), [Formula: see text] (12.04 [Formula: see text]m) and [Formula: see text] (9.12 [Formula: see text]m) alloys, which provides new feasibility in the future mid-wavelength infrared and long-wavelength infrared (MWIR/LWIR) device applications.