The invention discloses a steel pipe machining system with the automatic coding function, and belongs to the field of steel pipe machining. The system comprises an unwinding mechanism, a winded welding mechanism, a cutting mechanism, a transmission mechanism, a coding mechanism, a discharging mechanism, a chamfering mechanism and a transport vehicle; the unwinding mechanism enables a rolled boardto be flatly spread, the board is coded through the coding mechanism, and then the board is conveyed to the winded welding mechanism, after welding, the steel pipes are cut into the fixed length through the cutting mechanism, and then the board enters the transmission mechanism, the discharging mechanism is matched with the transmission mechanism, the chamfering mechanism is arranged on one side of the discharging mechanism, the transport vehicle is arranged at the tail end of the discharging mechanism, and after being chamfered, steel pipes are bundled and transported on the transport vehicle. According to the machining system, machining is achieved, coding, cooling, oil removal, discharging, water filtering and other processes can be automatically carried out, coding lettering and cooling of the steel pipe are well carried out, the conveying and transport mechanism is tight in linkage, and the machining quality and the machining efficiency of the steel pipes are greatly improved.