How information is encoded and decoded via spontaneous oscillations is investigated by using an ensemble of Hodgkin-Huxley neurons. A signal can be encoded in spontaneous and highly irregular spike trains via high-order rate coding with the second-order statistics being relevant, in which the temporal structure and the correlation between the spikes are taken into account. Although the encoded information is implicitly contained in the spike train, it can be retrieved in the post-synaptic potential. The spontaneous oscillation is filtered and the irregularity of the spike train is suppressed. In particular, we show that an arbitrary signal can be transmitted reliably through spontaneous and highly irregular spike trains, and then be reconstructed downstream in the information transmission pathway.