Aimed at the blind setting of parameter in kernel principal component analysis (KPCA), kernel function parameter optimized by particle swarm optimization algorithm (PSO) was proposed, and KPCA was applied to feature extraction. An objective function model of kernel function parameter was constructed firstly, then a particle swarm optimization algorithm with adaptive accelerate (CPSO) was used to optimize it, and the iris data were applied to the optimization method for simulation, which testified the KPCA effectivity in feature extraction. The optimized KPCA was applied to feature extraction of typical gearbox faults. The results indicate that the optimized KPCA can effectively reduce the dimension of feature vector of gearbox, and it has a better fault classification performance than linear principal component analysis (PCA). This method has an advantage in nonlinear feature extraction of mechanical failure signal.