Relic gravitational waves (GWs) can be produced by primordial magnetic fields. However, not much is known about the resulting GW amplitudes and their dependence on the details of the generation mechanism. Here we treat magnetic field generation through the chiral magnetic effect (CME) as a generic mechanism and explore its dependence on the speed of generation (the product of magnetic diffusivity and characteristic wavenumber) and the speed characterizing the maximum magnetic field strength expected from the CME. When the latter exceeds the former (regime I), the regime applicable to the early universe, we obtain an inverse cascade with moderate GW energy that scales with the third power of the magnetic energy. When the generation speed exceeds the CME limit (regime II), the GW energy continues to increase without a corresponding increase of magnetic energy. In the early kinematic phase, the GW energy spectrum (per linear wavenumber interval) has opposite slopes in both regimes and is characterized by an inertial range spectrum in regime I and a white noise spectrum in regime II. The occurrence of these two slopes is shown to be a generic consequence of a nearly monochromatic exponential growth of the magnetic field. The resulting GW energy is found to be proportional to the fifth power of the limiting CME speed and the first power of the generation speed.