Temperature changes during the chemical corrosion of stone cultural relics affect the condensation and evaporation of water and chemical reactions between soluble substances and corrosive solutions. This ultimately leads to changes in the internal structure and composition of the artifacts, which in turn lead to changes in the microstrain of cultural relics. To obtain in-situ real-time information on changes in the temperature and microstrain of stone cultural relics during chemical corrosion damage, a fiber Bragg grating (FBG) detection system was developed. The detection principle for the temperature and microstrain of sandstone was provided. Thermal field emission scanning electron microscopy, X-ray diffraction, and mercury intrusion porosimetry were used to characterize the surface morphology, composition, and pore structure of the sandstone samples, respectively. The temperature and microstrain changes of the sandstone samples under deionized water with different acidic/alkaline and salt solutions and at different temperatures were examined online in situ using the FBG measurement system. The results indicate that the dissolution of sandstone in the acidic solution (H2SO4 and NaHSO4) resulted in an exothermic chemical reaction as well as the dissolution of sandstone in the neutral salt solution (Na2SO4) and alkaline solution (NaOH and Na2CO3) led to material conversion and exothermic chemical reaction; the deionization reaction belongs to the dissolution reaction. The NaHSO4 solution caused the most serious corrosive disease on the sandstone surface. When the temperature of the NaHSO4 solution was 60 °C, the temperature and microstrain of the sandstone reached 63.9 °C and 253.6 με, respectively. The results of this study can support the research of revealing the corrosion mechanism of sandstone in different environments.