High‐quality perovskite thin film is one of the most key factors as to the state‐of the‐art perovskite solar cells (PSCs). Solvent‐engineering has caused widespread concern in the aspects of improving the high‐quality perovskite layers. For the preparation of the cation‐anion‐mixed perovskite Cs0.05(MA0.17FA0.83)0.95Pb(I0.83Br0.17)3, the influence of the perovskite precursor composition on the quality of perovskite layers is not clear yet. Here, we conduct a systematic study on the solution composition by changing the molar ratio for lead (Pb) to dimethyl sulfoxide (DMSO). Significantly, we obtain a dense, uniform, long charge carrier lifetime perovskite thin film, which facilitates charge transportation and reduces charge recombination in PSCs and thus considerably improves the device performance. Based on solvent engineering of DMSO and replacing toxic solvent chlorobenzene with green solvent ethyl acetate, a high‐quality perovskite layer is prepared and the device based on green solvent process exhibits a power conversion efficiency (PCE) of 19.23 %.