Asphaltene is a complex blend of high-molecular-weight hydrocarbons present in crude oil. It is a solid, insoluble component that precipitates from oil under certain circumstances, such as temperature (Temp), pressure, or composition changes. Despite its problems, asphaltene has potential uses in a variety of sectors, including the manufacture of carbon materials, asphalt, and pharmaceuticals. Specifically, this study investigated the changes in the asphaltene compaction process under carbon dioxide (CO2) injection by examining changes in initial temperature and analyzing influencing parameters such as radial distribution function, radius of gyration, and density changes. In this study, thermodynamic equilibrium in simulated asphaltene samples was achieved within 10 ns, with temperature and kinetic energy stabilizing at 310 K and 0.86 kcal/mol, respectively. The subsequent analysis focused on the agglomeration of asphaltene molecules under varying temperatures. The agglomeration process was completed within 10 ns, with the gyration radius stabilizing at 30.5 Å, providing insights into asphaltene behavior and its impact on petroleum fluid properties. At 300 K, asphaltene agglomeration increased viscosity to 23.3 Pa s by reducing molecular movement, illustrating the complex relationship between aggregation and fluid viscosity. The study also observed that asphaltene agglomeration increased viscosity to approximately 23.3 Pa s at 300 K due to reduced molecular movement. As the temperature was raised from 300 to 400 K, the maximum density profile decreased from 0.0225 to 0.0207 atom/Å3, while the gyration radius of asphaltene molecules decreased from 30.54 to 28.51 Å and viscosity increased from 23.3 to 23.92 Pa s. These results highlight the intricate effects of temperature on asphaltene dynamics and petroleum fluid properties.