We investigate the generation and distribution of high-energy electrons in the cosmic structure environment and their observational consequences by carrying out the first cosmological simulation that includes directly cosmic-ray (CR) particles. Starting from cosmological initial conditions, in addition to the gas and dark matter related quantities, we follow the evolution of CR electrons (primary and secondary) and CR ions along with a passive magnetic field. CR ions and primary electrons are injected in accordance with the thermal leakage model and accelerated in the test-particle limit of diffusive shock acceleration at shocks associated with large-scale structure formation. Secondary electrons are continuously generated through p-p inelastic collisions of the CR ions with the thermal nuclei of the intergalactic medium. The evolution of the CR electrons accounts for spatial transport, adiabatic expansion/compression, and losses due to Coulomb collisions, bremsstrahlung, synchrotron and inverse-Compton emission. The magnetic field is seeded at shocks according to the Biermann battery model, and thereafter amplified by shear flow and gas compression. We compute the emission due to the inverse-Compton scattering of the simulated primary and secondary electrons off cosmic microwave background photons and compare it with the published values of the detected radiation excesses in the hard X-ray and extreme-ultraviolet wavebands. We find that the few instances of detection of hard X-ray radiation excess could be explained in the framework of IC emission from primary electrons in clusters characterized by high accretion/merger activity. On the other hand, with the only exception of measured flux from the Coma Cluster by Bowyer, Berghoefer & Korpela, both primary and secondary CR electrons associated with the cosmic structure formation account at most for a small fraction of the radiation excess detected in the extreme-ultraviolet waveband. Next, we calculate the synchrotron emission after normalizing the magnetic field strength so that for a Coma-like cluster the volume-averaged B21/2 3 ?G. Our results indicate that the synchrotron emission from the secondary CR electrons reproduces several general properties observed in radio halos. These include the recently found P1.4 GHz versus TX relationship, the morphology and polarization of the emitting region, and, to some extent, even the spectral index. In addition, radio synchrotron emission from primary electrons turns out to be large enough to power extended regions of radio emission, resembling radio relics observed at the outskirts of clusters. Once again we find a striking resemblance between the general properties of morphology, polarization, and spectral index of our synthetic maps and those of reported in the literature.