The traditional morphological filter is difficult to remove the noise of the vibration signal,because the signal has the characteristics of shocking and nonlinear. A new method based on multiscale morphological filter optimized by particle swarm optimization algorithm is proposed. The multiscale morphological filter is constructed according to the character of morphological algorithm. The particle swarm optimization algorithm is used to select the adaptive structure element,which plays an important role in morphological filter,achieving to get the optimal morphological filter. The signal is filtered through different scales of morphological filters and the noise removed signal is gotten through weight algorithm. The simulated signal and the bearing fault signal are analyzed,and the results show that the optimal morphological filter works better in removing noise and can effectively reduce the noise of the mechanical equipment.