Bi5O7I is a member of the bismuth oxyiodides family with unique layered structures, generating an internal electrostatic field to promote the separation and transfer of photogenerated charge carriers. To further enhance its visible-light photocatalytic activity, various strategies, including creating the heterojunction, forming the defects, and engineering the bandgap and composition, have been applied. Another promising strategy is to construct a heterostructured photocatalyst. Here, we report a doping-induced formation of orthorhombic/monoclinic-Bi5O7I (o-Bi5O7I/m-Bi5O7I) heterostructure and its visible-light photocatalytic activity for organic dye degradation and NO removal. Under hydrothermal conditions, Bi5O7I is doped with Er3+, upconversion luminescence agent, in a varying content. The XRD results reveal that 3% Er3+ is decisive in commencing the phase transition from orthorhombic to monoclinic. Though an increasing content of Er3+ induces the phase transition, flower-like Bi5O7I microspheres assembled by nanosheets remains unchanged. An obvious redshift in the absorption edge and enhancement of visible-light absorption are observed for Bi5O7I samples doped with >3% Er3+ due to the orthorhombic-to-monoclinic phase transition. The photocatalytic activities of the samples were evaluated by the degradation of three different organic dyes (Rhodamine B, methyl orange and methylene blue) in aqueous solution under white LED light irradiation and the photooxidative removal of gaseous NO under simulated solar light irradiation. The 5% Er3+-doped Bi5O7I shows the highest photocatalytic activity for the photodegradation of Rhodamine B (91.3%), methyl orange (70.0%) and methylene blue (76.0%) and for the photooxidative removal of NO (54.0%) under visible light. A strong luminescence generating extra photons, the formation of an orthorhombic/monoclinic-Bi5O7I heterostructure promoting more effective charge separation, and the emergence of monoclinic-Bi5O7I absorbing more visible light are a collective mechanism leading to the enhancement of photocatalytic activity.