The invention discloses a method for producing irregular-section composite pipes, belonging to the technical field of metal composite materials. The method comprises the following steps: an irregular-section aluminum pipe is extruded and formed, the surface of the inner hole of the irregular-section aluminum pipe is modified, the external surface of a stainless steel pipe is modified, the surface-modified stainless steel pipe is inserted into the inner-hole-surface-modified irregular-section aluminum pipe, the assembling end parts of the stainless steel pipe and the irregular-section aluminum pipe are sealed after the assembling is completed, and the welded part of the irregular-section aluminum pipe and the stainless steel pipe is put into a hot isostatic pressure furnace for heat treatment to obtain an irregular-section composite pipe. The irregular-section composite pipes produced through the invention have the advantages that the weight is light, the strength is high, the thermal expansion efficiency is high, the interfacial metallurgical bonding ratio is close to 100 percent, the interfacial heat exchange coefficient is high, the bonding strength is high, the service life in severe cold-and-hot-alternation environment and the like, can be used in heat pipe systems which are key technical hardware of aircrafts, aerospacecrafts and other spacecrafts, and can be widely used in fields such as power, electronics, ships, nuclear energy and the like.