Perovskite photodetectors have attracted great interest because of their excellent physical properties and the feasibility of low-cost manufacturing by printing processes. Among various types of photodetectors, phototransistors are usually characterized by superior gain due to their inherent amplification function. In the work, an n-SnO2/p-CH3NH3PbI3/n-CH3NH3PbI3 heterojunction bipolar phototransistor is proposed and numerical analyzed with Silvaco TCAD simulator for the first time. The influence of perovskite base and collector doping concentration, base thickness, and SnO2 emitter doping concentration are investigated to optimize the device performance. The simulation results indicate that properly reducing the perovskite base thickness and doping concentration will greatly enhance the emitter injection efficiency and spectral response. With higher collector doping concentration, the base–collector junction can form a higher electric field, which is conducive to producing a higher spectral response. Moreover, an enhanced emitter injection efficiency can be obtained with a higher SnO2 emitter doping concentration. Under realistic conditions, the device exhibits excellent performance with a high external quantum efficiency of 1.48 × 103% at 425 nm, a responsivity of 6.8 A/W at 650 nm and a detectivity is 1.63 × 1014 Jones at 650 nm under a low bias voltage of 0.8 V. Simulation result indicates that the proposed perovskite NPN heterojunction bipolar phototransistor is a promising architecture and will open a new path for the development of high-performance perovskite photodetector.