The present invention discloses a bending and molding mechanism, comprising a base, wherein the base is provide with a transverse sliding rail, two transverse sliding bases are disposed on the transverse sliding rail in a sliding manner, the base is provided with a transverse driving device driving the transverse sliding bases, the base is provided with a central clamping device which can clamp the wire and can rotate around a central axis of the wire between the two transverse sliding bases, the transverse sliding bases are provided with a longitudinal sliding rail, the longitudinal sliding rail is provided with a longitudinal sliding base, the transverse sliding bases are provided with a longitudinal driving device driving the longitudinal sliding base to slide, the longitudinal sliding base is provided with a bending and molding device, one side, close to the central clamping device, of the transverse sliding base at the left side is provided with a left clamping device capable of movably extending to clamp the wire, and one side, close to the central clamping device, of the transverse sliding base at the right side is provided with a right clamping device capable of movably extending to clamp the wire. The device is simple in structure, and can bend two sides of tubular products or wires from different bending angles and different bending radii.