A curious rotation period distribution in the colour-magnitude-period diagram (CMPD) of the Kepler field was recently revealed, thanks to data from Gaia and Kepler spacecraft. It was found that redder and brighter stars are spinning slower than the rest of the main sequence. On the theoretical side, it was demonstrated that metallicity should affect the rotational evolution of stars as well as their evolution in the Hertzprung-Russel or colour-magnitude diagram. In this work, we combine this data set with medium- and high-resolution spectroscopic metallicities and carefully select main-sequence single stars in a given mass range. We show that the structure seen in the CMPD also corresponds to a broad correlation between metallicity and rotation, such that stars with higher metallicity rotate, on average, more slowly than those with low metallicity. We compare this sample to theoretical rotational evolution models that include a range of different metallicities. They predict a correlation between rotation rate and metallicity that is in the same direction and of about the same magnitude as that observed. Therefore, metallicity appears to be a key parameter to explain the observed rotation period distributions. We also discuss a few different ways in which metallicity can affect the observed distribution of rotation period, due to observational biases and age distributions, as well as the effect on stellar wind torques.