The new all-inorganic CsPb
X3 perovskite material is expected to be used as an absorbing layer to prepare solar cells for efficient and stable commercial devices. However, the problems of high cost and poor stability, caused by precious metal electrodes and hole transport materials, urgently need solving. Therefore, carbon-based perovskite solar cells (C-PSCs) based on the HTL-free all-inorganic system have attracted widespread attention. This work adopts a strategy of finely regulating the ratio of I to Br in X-site of perovskite. Using the one-step anti-solvent method, CsPbI
xBr
3–x films and HTL-free C-PSCs are prepared under ambient air condition. By comparing their light absorption characteristics, carrier transport, and corresponding optoelectronic properties, a balance point between efficiency and stability is found. Finally, HTL-free C-PSCs achieve an optimal efficiency of 10.10% and can be stably prepared under ambient air conditions. In order to further improve the performance of the corresponding devices, phenylethylammonium bromide (PEABr) is introduced into the perovskite, and the crystallinity, carrier transport, defect situation, and corresponding optoelectronic properties of perovskite films and devices are compared under different conditions. Ultimately, the perovskite film treated with PEABr reaches better crystallinity and lower defect density, while generating a small amount of two-dimensional perovskite which can passivate the perovskite film and suppress non-radiative recombination of charge carriers. After appropriate PEABr treatment, the photoelectric conversion efficiency (PCE) of the device is significantly enhanced, increasing from 10.18% of the optimal device in the control group to 12.61%. Thus, this method provides an optimal approach for preparing efficient and low-cost HTL-free C-PSCs under ambient air environments.