The n-p-i-n AlGaN solar-blind ultraviolet double heterojunction phototransistor (DHPT) with internal gain is proposed and optimized in this paper. The dependences of spectral responsivity and quantum gain on structure parameters of the AlGaN DHPT are simulated in detail. Then, the polarization effect of AlGaN heterojunction on the performance of AlGaN DHPT is also investigated. Results show that positive polarization charge would enhance the photoresponse of the device, whereas the negative polarization charge would reduce the photoresponse significantly. The reasons for the polarization effect on performance of AlGaN DHPT are discussed.