There are solutions of Maxwell equations in vacuum in which the magnetic and the electric lines have a nontrivial topology. This behaviour has physical consequences since it is related to classical expressions indicating aspects of the photon content of the electromagnetic field. In this work we present for the first time an exact solution of Maxwell equations in vacuum, having non trivial topology, in which there is an exchange of helicity between the electric and magnetic part of such field. We calculate the temporal evolution of the magnetic and electric helicities, and explain the exchange of helicity making use of the Chern-Simon form. We also have found and explained that, as time goes to infinity, both helicities reach the same value and the exchange between the magnetic and electric part of the field stops.