A method of producing a 3D thread using ultrasonic waves according to the present disclosure includes inserting yarn located between an ultrasonic generator and a mold base adjacent to each other into a location corresponding to an engraved pattern of the mold base, applying ultrasonic waves to the yarn while pressing the yarn by the ultrasonic generator, and producing a medical anti-loosening member formed into the shape of the engraved pattern using the ultrasonic waves, and the medical anti-loosening member includes a medical 3D thread including multiple barbs facing on both sides and a medical anti-loosening screw.