The invention discloses a device of measuring the thickness of a steel strip during a production process by using a distance sensor, which comprises a box-type shell, a supporting plate, a rechargeable battery, a flatting device, a distance sensor, four pairs of transmission roller groups, a steel strip buffer device and a pressure detection device, wherein the box-type shell, from inside to outside along the steel strip horizontal movement direction, is sequentially provided with a left limiting block, a first transmission roller group, the flatting device, a second transmission roller group, a right limiting block, a third transmission roller group, the steel strip buffer device and a fourth transmission roller group; the steel strip buffer device comprises an upper ejector roller, an upper ejector rod, a fixing block, a supporting seat and a reset spring; the upper ejector roller is fixed at the top part of the vertically-arranged upper ejector rod; and the upper ejector roller is contacted with the steel strip for lifting the steel strip. The device of the invention has the advantages that the moving is convenient; the operation is simple; the measurement process can be carried out in an online mode; the detection process is continuous; data calling is carried out conveniently; measurement on coiled steel strip is greatly facilitated; and mass promotion and use are facilitated.