Inorganic tin (Sn)–lead (Pb)-mixed halide perovskites have attracted more interest than organic–inorganic hybrid lead halide perovskites due to their broad response wavelength range and high thermal stability. To improve the performance of Sn–Pb-mixed halide perovskite-based devices, it is essential to further manipulate carrier separation and recombination. Herein, a gradient inorganic CsPb0.7Sn0.3I3-based self-powered photodetector is presented. By adjusting the annealing temperature to optimize the gradient distribution degree of Sn and Pb in CsPb0.7Sn0.3I3 perovskite films, the optimal gradient perovskite device exhibits a high responsivity (0.18 A W−1), large specific detectivity (2.5 × 1012 Jones), and fast response speed (58.9/42 µs). The performance is comparable to the majority of Sn–Pb-mixed or pure Sn perovskite-based photodetectors reported previously. Correspondingly, the improved performance could be mainly attributed to the gradient distribution-induced band bending, which promotes the separation and transport of photogenerated carriers.