Due to the important role of crude oil desalting for the whole petroleum refining process, the near-infrared spectroscopy resulting from molecular vibration is used to detect and isolate potential faults of the desalting process in this paper. With the molecular spectral data reflected by the near-infrared spectroscopy, the principal component analysis is adopted to monitor the process to see if it is in a normal operating condition or not. Considering the feature that the dimension of near-infrared spectroscopy is much larger than the sample size, the least absolute shrinkage and selection operator is employed to achieve an automatic variable selection procedure of the observed spectral data. Simultaneously, if some faults occur, the least absolute shrinkage and selection operator can be used to locate the spectral region affected by the failure. In such a way, the roots of faults can be tracked according to the change of the wavelength numbers. Performances of the proposed fault detection and isolation approaches are evaluated based on the near-infrared spectroscopy sampled for the crude oil desalting process to show the effectiveness.