The presence of ubiquitous magnetic fields in the Universe is suggested from observations of radiation and cosmic ray from galaxies or the intergalactic medium ( IGM ) . One possible origin of cosmic magnetic fields is the magnetogenesis in the primordial Universe . Such magnetic fields are called primordial magnetic fields ( PMFs ) , and are considered to affect the evolution of matter density fluctuations and the thermal history of the IGM gas . Hence the information of PMFs is expected to be imprinted on the anisotropies of the cosmic microwave background ( CMB ) through the thermal Sunyaev-Zel ’ dovich ( tSZ ) effect in the IGM . In this study , given an initial power spectrum of PMFs as P ( k ) \propto B _ { 1 Mpc } ^ { 2 } k ^ { n _ { B } } , we calculate dynamical and thermal evolutions of the IGM under the influence of PMFs , and compute the resultant angular power spectrum of the Compton y -parameter on the sky . As a result , we find that two physical processes driven by PMFs dominantly determine the power spectrum of the Compton y -parameter ; ( i ) the heating due to the ambipolar diffusion effectively works to increase the temperature and the ionization fraction , and ( ii ) the Lorentz force drastically enhances the density contrast on small scale just after the recombination epoch . These facts result in making the anisotropies of the CMB temperature on small scales , and we find that the signal goes up to 10 ~ { } \muK ^ { 2 } around \ell \sim 10 ^ { 6 } with B _ { 1 ~ { } Mpc } = 0.1 nG and n _ { B } = 0.0 . Therefore , CMB measurements on such small scales may provide a hint for the existence of the PMFs .