For suture tying in a medical procedure including the use of an anchor that includes a suture locking device that includes a sliding pin guided by axial side slots formed in the locking device that forces the suture where the two ends thereof are inserted into the interior of the suture locking mechanism to drive the captured suture and pin to fit into a recess on the top of the suture locking mechanism such that the top of the pin binds the suture against the upper inner surface of the recess. The recess can be serrated to enhance the locking capability and the pin is polygonal shaped to provide side surfaces that run parallel to the wall of the recess to assure that the side portion of the pin does not fracture the suture and cause it to weaken. The locking of the suture is automatic upon the deployment of the anchor which actuates the pin into the locking position, thus eliminating the necessity of manually knotting the suture and improving the cinching of the tissue to the bone. The suture locking mechanism is usable for attaching tissue to the bone, tying tissue to tissue and the like. The disclosure also includes the method of deploying the combined anchor and suture locking device in a medical procedure.