The invention discloses a device for simultaneously grinding the inner walls and the outer walls of steel pipes. The device comprises a workbench, a support, a collecting tank, a clamping mechanism, an outer grinding mechanism and an inner grinding mechanism; the support is arranged at the upper end of the workbench, and the clamping mechanism is arranged at the left end of the inner side of the support and comprises a clamping plate, a rotating motor, an annular gear, a gear, electric telescopic rods, supporting plates, rubber pads and springs; the outer grinding mechanism is installed at thelower end of a moving block; and the inner grinding mechanism is arranged under the outer grinding mechanism and comprises an inner grinding wheel, a threaded rod B, a fixing sleeve, a threaded sleeve, a second sliding groove, an electric hydraulic cylinder, a drive gear, a driven gear A, a driven gear B, a rectangular block and a connecting rod. The device is novel in design, simple in structure, capable of simultaneously grinding the inner walls and the outer walls of steel pipes with different thicknesses, high in grinding efficiency, wide in application range, capable of effectively preventing impurities such as scrap iron from polluting the environment, high in practicality and worthy of popularization.