  Primordial magnetic fields (PMFs) are one of the plausible candidates for the
origin of the observed large-scale magnetic fields. While many proposals have
been made for the generation mechanism of PMFs by earlier studies, it remains a
subject of debate. In this paper, to obtain new insights into PMFs, we focus on
the intrinsic alignments (IAs) of galaxies induced by the vector and tensor
modes of the anisotropic stress of PMFs. The long-wavelength vector and tensor
modes locally induce the tidal gravitational fields, leading to the
characteristic distortions of the intrinsic ellipticity of galaxies. We
investigate the shear E- and B-mode power spectra induced by the magnetic
vector and tensor modes in the three-dimensional space, assuming the
combination of galaxy imaging and galaxy redshift surveys. We find that the
magnetic tensor mode dominates both the E- and B-mode spectra. In particular,
the B-mode spectrum induced by the magnetic tensor mode plays a crucial role in
constraining the amplitude of PMFs, even in the presence of the non-magnetic
scalar contribution to the B-mode spectrum arising from the one-loop effect. In
future galaxy redshift surveys, such as Euclid and Square Kilometre Array, the
minimum detectable value reaches $\sim 30 \, \rm nG$, which can potentially get
even smaller in proportion to the number of observed galaxies and reach $\sim
\mathcal{O}(1 \, {\rm nG})$. Measuring the IAs of galaxies would be a potential
probe for PMFs in future galaxy surveys.
