By virtue of neural network, a series of signals is extended forward and backward, as a result, two additional maxima and two additional minima are obtained at both ends of the original data set, with which the EMD decomposition can be exactly achieved with cubic spline interpolation. Meanwhile, by using of neural network every IMF component can also be extended forward and backward, which effectively restrains the end effect, thus the veracious Hilbert spectra are achieved. Verifications of the sample signals and the actual surface elevation of sea waves show that the present extension method is relatively accurate.