This study presents a systematic investigation of the effect of infill density values on inner temperature change of carbon fiber filament in additive manufacturing process. Five groups of additive manufacturing experiments were carried out using carbon fiber filament, and the considered infill density values were 20 %, 40 %, 60 %, 80 %, and 100 %, respectively. Fiber Bragg grating (FBG) sensors were selected as measurement sensors to monitor internal temperature change of all prototypes during additive manufacturing process. Monitoring tests indicate that fabrication of carbon fiber filament in additive manufacturing method leads to a significant temperature rise of FBG sensors. The obtained relationship of temperature change against printing time is characterized by three different typical phases including an initial temperature rise in the first stage, a gradual temperature reduction in the second stage, and a temperature decrease after printing is finished in the third stage. It is found that the peak value of temperature raised from 5.0 ℃ to 12.6 ℃ in the second stage when infill densities increased from 20 % to 100 %. The maximum peak value of temperature raised about 9.7–19.8 ℃ in the third stage. The obtained decrease rates of inner temperature change were − 0.289 ℃/layer, − 0.334 ℃/layer, − 0.304 ℃/layer, − 0.303 ℃/layer, and − 0.294 ℃/layer, respectively. The monitoring test data provide a better understanding of temperature change of carbon fiber filament and therefore can be further used to indicate thermal expansion and contraction during additive manufacturing process.