The invention discloses a sealing ring surface defect detection method based on machine vision. The sealing ring surface defect detection method comprises the following steps: firstly, acquiring images of the surface of a sealing ring, and performing self-adaptive median filtering treatment on the acquired images; subsequently, calculating a gray level gradient and a vertical gradient of the images, and extracting gray bevel structures in the images according to the gray level gradient and the vertical gradient; partitioning different bevel characteristic point neighborhoods, and calculating a gray level mean of the partitioned neighborhoods; finally, by taking functions for describing the gray level difference degree of the partitioned neighborhoods as defect judgment principles, screening out defect outline points, and detecting the defects of the surface of the sealing ring. According to the forming reason of the defects of the surface of the sealing ring, inherent differences of defect outlines and appearance outline of the sealing ring can be analyzed and verified on the images, various types of defects, including recesses, rill marks, impurities, trimming and over-cutting defects, on the surface of the sealing ring can be detected, and the method has the advantages of high defect detection accuracy, good algorithm robustness and the like.