2D perovskites have attracted extensive attention due to their excellent stability compared with 3D perovskites. However, the intrinsic hydrophilicity of introduced alkylammonium salts effects the humidity stability of 2D/3D perovskites. Devices based on longer chain alkylammonium salts show improvement in hydrophobicity but lower efficiency due to the poorer charge transport among various layers. To solve this issue, two hydrophobic short-chain alkylammonium salts with halogen functional groups (2-chloroethylamine, CEA + and 2-bromoethylamine, BEA + ) are introduced into (Cs 0.1 FA 0.9 )Pb(I 0.9 Br 0.1 ) 3 3D perovskites to form 2D/3D perovskite structure, which achieve high-quality perovskite films with better crystallization and morphology. The optimal 2D/3D perovskite solar cells (PSCs) with 5% CEA + display a power conversion efficiency (PCE) as high as 20.08% under 1 sun irradiation. Because of the notable hydrophobicity of alkylammonium cations with halogen functional groups and the formed 2D/3D perovskite structure, the optimal PSCs exhibit superior moisture resistance and retain 92% initial PCE after aging at 50 ± 5% relative humidity for 2400 h. This work opens up a new direction for the design of new-type 2D/3D PSCs with improved performance by employing proper alkylammonium salts with different functional groups.