The invention discloses a workpiece surface roughness and flatness detection device which comprises a supporting frame, a guiding sliding groove, a limiting clamping plate, a material guiding mechanism, a detection mechanism, a connecting workpiece, a threaded rod, a material storage box, a guiding groove, a servo motor, a connecting belt, a connecting belt wheel and a rotating shaft groove. A supporting frame used for supporting is fixedly installed at the position, close to the center, of the upper end face of the material guiding mechanism, and limiting clamping plates are symmetrically and fixedly installed on the lower end face of the supporting frame. By arranging the workpiece template, a connecting workpiece can be compared with a standard part during detection, so that the efficiency and the stability of subsequent detection of the connecting workpiece are improved to the greatest extent, meanwhile, two groups of supporting sliding grooves are formed, two groups of connecting workpieces can be detected at the same time, the speed of detecting the connecting workpiece is effectively improved, and the detection accuracy is improved. And the detection efficiency is improved.