The present study describes the strategic doping of Fe metal ions into a BiOI microstructure using ex situ and in situ processes to synthesize a Fe−BiOI microstructure and their effect on photocatalytic degradation of tetracycline (TC). The data suggested that in situ Fe−BiOI (Fe−BiOI-In) has superior performance compared to ex situ Fe−BiOI (Fe−BiOI-Ex) due to the uniform dispersion of Fe within the Fe−BiOI material. Calculated bandgaps ∼1.8, ∼1.5, and 2.4 eV were observed for BiOI (without Fe), Fe−BiOI-In, and Fe−BiOI-Ex, respectively. Interestingly, Fe incorporation within BiOI might decrease the bandgap in Fe−BiOI-In due to the uniform distribution of metal ions, whereas increasing the bandgap in Fe−BiOI-Ex attributed to nonuniform distribution or agglomeration of metal ions. The uniform dispersion of Fe within Fe−BiOI modulates electronic properties as well as increases the exposure of Fe ions with TC, thereby higher degradation efficiency of TC. The in situ Fe−BiOI material shows 67 and 100% degradation of TC at 10 and 1 mg/L, respectively. The TC degradation was also found to be pH-dependent; when increasing the pH value up to 10, 94% degradation was achieved at 10 mg/L within 60 min of solar irradiation. The analysis was also performed over BiOI, which proves that Fe has a profound effect on TC degradation as Fe(II) tends to trigger oxidation−reduction by utilizing the chelate formation tendency of TC. Therefore, the prepared Fe−BiOI-In has the potential ability to degrade pharmaceutical compounds, especially, TC from wastewater.