The Peccei-Quinn mechanism proposed to solve the CP problem of Quantum Chromodynamics has as consequence the existence of axions, hypothetical weakly interacting particles whose mass is constrained to be on the sub-eV range. If these particles exist and interact with electrons, they would be emitted from the dense interior of white dwarfs, becoming an important energy sink for the star. Due to their well known physics, white dwarfs are good laboratories to study the properties of fundamental particles such as the axions. We study the general effect of axion emission on the evolution of helium-rich white dwarfs and on their pulsational properties. To this aim, we calculate evolutionary helium-rich white dwarf models with axion emission, and assess the pulsational properties of this models. Our results indicate that the rates of change of pulsation periods are significantly affected by the existence of axions. We are able for the first time to independently constrain the mass of the axion from the study of pulsating helium-rich white dwarfs. To do this, we use an estimation of the rate of change of period of the pulsating white dwarf PG 1351+489 corresponding to the dominant pulsation period. From an asteroseismological model of PG 1351+489 we obtain gae < 3.3 × 10−13 for the axion-electron coupling constant, or ma cos2 β . 11.5 meV for the axion mass. This constraint is relaxed to gae < 5.5 × 10−13 (ma cos2 β . 19.5 meV), when no detailed asteroseismological model is adopted for the comparison with observations.