Nuclear magnetic resonance (NMR) spectral analysis has recently become one of the major means for the detection and recognition of metabolic changes of disease state, physiological alteration, and natural biological variation. For the pattern recognition tasks in which two or more NMR spectra need to be compared, it is critical to properly align the spectra for the subsequent pattern recognition analysis. Previous spectral alignment methods do not consider any baseline intensity variation between the spectra and disregard the effect of noise. Here we formulate the spectra alignment problem in a Bayesian statistical framework, which allows us to simultaneously and efficiently estimate the spectral shift and the baseline intensity variation in the existence of independent additive noise. Experimental results with real high-resolution NMR spectral data from human plasma demonstrate the effectiveness and robustness of the proposed approach.