The electroencephalograph (EEG) source imaging (ESI) method is a non-invasive method that provides high temporal resolution imaging of brain electrical activity on the cortex. However, because the accuracy of EEG source imaging is often affected by unwanted signals such as noise or other source-irrelevant signals, the results of ESI are often incongruous with the real sources of brain activities. This study presents a novel ESI method (WPESI) that is based on wavelet packet transform (WPT) and subspace component selection to image the cerebral activities of EEG signals on the cortex. First, the original EEG signals are decomposed into several subspace components by WPT. Second, the subspaces associated with brain sources are selected and the relevant signals are reconstructed by WPT. Finally, the current density distribution in the cerebral cortex is obtained by establishing a boundary element model (BEM) from head MRI and applying the appropriate inverse calculation. In this study, the localization results obtained by this proposed approach were better than those of the original sLORETA approach (OESI) in the computer simulations and visual evoked potential (VEP) experiments. For epilepsy patients, the activity sources estimated by this proposed algorithm conformed to the seizure onset zones. The WPESI approach is easy to implement achieved favorable accuracy in terms of EEG source imaging. This demonstrates the potential for use of the WPESI algorithm to localize epileptogenic foci from scalp EEG signals.