The all-inorganic CsPbBr3 perovskite solar cells exhibit excellent stability against humidity and thermal conditions as well as relatively low production cost, rendering them a gradually emerging research hot spot in the field of photovoltaics. However, the absence of a hole transport layer (HTL) in its common structure and the substantial energy level difference of up to 0.6 eV between the highest occupied molecular orbital (HOMO) level of CsPbBr3 and the work function of the carbon electrode have emerged as the primary factor limiting the improvement of its power conversion efficiency (PCE). In this work, the monomer 2,5-dibromo-3,4-ethylenedioxythiophene (DBEDOT) is spin-coated onto the surface of the CsPbBr3 film directly and then subjected to annealing; DBEDOT undergoes in situ polymerization to form poly(3,4-ethylenedioxythiophene) (PEDOT), which aims to ameliorate the issue of excessive energy level difference between CsPbBr3 and the carbon electrode, and to facilitate the extraction and transport efficiency of holes between the CsPbBr3 perovskite and the carbon electrode. Compared to the pristine device, the PCE of the device based on in situ polymerization is enhanced and achieves a maximum efficiency of 9.81%. Furthermore, the unencapsulated devices based on in situ polymerization maintain 95.9% of their original efficiency after 40 days of stability testing.