Metal doping, including Bi, Yb, Eu, Sb and so on, are important means to improve the photoelectric properties and stability of metal halide perovskite materials. Among these works, Bi-doped CsPbBr3 especially has attracted much attention for both experimental and theoretical investigation. But there are still some arguments to be solved. One view thinks that Bi doping in CsPbBr3 not only influences the band structure, but also improves the charge transfer (Raihana et al 2017 J. Am. Chem. Soc. 139 731–7). The other supported the points that there are no changes in the valence band structure of Bi-doped CsPbBr3 and the concept of the band-gap engineering in Bi-doped CsPbBr3 halide perovskite is not valid (Olga et al 2018 J. Phys. Chem. Lett. 9 5408–11). They also have different opinions for the reason of the red-shift phenomenon caused by Bi-doped CsPbBr3. In this work, the density functional theory (DFT) based first-principles methods is adopted to investigate the effect of the optical properties and electronic structure for Bi doping CsPbBr3. The calculated results clarify that the red-shift phenomenon is caused by the slight reduction of band gap and the transition levels of Bii and BiPb defects. The values of red-shift also were estimated about 150 meV for Bii defects, which is close the experimental value of about 140 meV. Moreover, our studies also show that the Bi doping does not affect the valence bands, but Bii defects change the electron distribution of the conduction band. Our work and experimental results support and confirm each other, which provides a useful reference for the study of Sb-doped CsPbBr3, Eu-doped CsPbBr3 and so on.