The invention relates to a production line for coating the inner wall and the outer wall of a metal pipe. The production line comprises a feeding device, an inner wall purging device, an outer wall purging device, a preheating furnace, an inner suction coating device, a heat supplementing furnace, an outer spraying device, a curing furnace, a forced cooling chamber, an inspection station, a labeling mechanism, a code spraying mechanism and an automatic packaging system which are sequentially arranged from front to back, the automatic packaging system comprises an material collecting and steering conveying mechanism, bagging and film covering mechanisms, an electromagnetic carrying mechanism, a hexagonal forming device, a horizontal winding device, a semi-automatic steel belt bundling mechanism, a bundling machine conveying line, a steel pipe conveying, transferring and storing mechanism, a steel pipe weighing mechanism and an electric control box, the bagging and film covering mechanisms and the code spraying mechanism are in butt joint through the material collecting and steering conveying mechanism, the material collecting and steering conveying mechanism conveys at least two workpieces to the bagging and film covering mechanisms at a time, and correspondingly, the multiple bagging and film covering mechanisms are arranged and synchronously conduct bagging and shrinking. The production line can guarantee the quality of the workpieces and improve the packaging efficiency.