Polyaniline (PANI) conducting polymers exhibit potential electrochromic properties. However, the electrochromic response of PANI films in the infrared (IR) ranges is restricted by their dense structure. Herein, the polyaniline/carbon quantum dots (PANI/CQDs) films were synthesized with sulfuric acid (SA) and CQDs as the dopants. The tetrahedral structures of SA contribute to the formation of highly oriented lamellar PANI. The synergistic effect between CQDs and PANI promotes the loose and porous surface morphology, thereby improving the electrochromic performance of PANI film. The PANI/CQDs porous film for the polymerization charge of 0.5C (PANI/CQDs-5) shows the optimal electrochromic properties and IR modulation capacity, achieving an optical contrast (ΔT) values of 53 % at 850 nm, and with the emittance variation (Δε) values of 0.41, 0.46 and 0.42 in 3–5 μm, 8–14 μm, and 2.5–25 μm, respectively. Furthermore, the switching time of the PANI/CQDs-5 films for coloration and blanching are 2.5 s and 3.6 s, respectively, with over 95 % retention after 100 cycles. Theoretical calculations verified that PANI/CQDs composite films displayed outstanding electron and ion transfer kinetics, facilitating superior electrochromic properties.