The invention relates to door hinges, in particular to a door hinge capable of achieving parking at random angle through the thread self-locking function. The door hinge mainly comprises a sliding block, an inner hexagon nut I, a connecting rod, a fixed hinge, a guide rail, a center shaft, a blocking piece, a locking fixed screw cap, a left-hand rotating moving screw cap, a pressure spring, aright-hand rotating moving screw cap, a rotating hinge, a shell, an inner hexagon bolt, an inner hexagon nut II, a fixed plate and a hinge fixing shell; a left-hand thread and a right-hand thread are arranged at the two ends of the center shaft correspondingly, the lengths and the screw pitches of the left-hand thread and the right-hand thread are equal, the pressure spring is arranged on the middle segment of the periphery of the center shaft in a sleeving manner, the left-hand moving screw cap and the right-hand moving screw cap are screwed in from the two ends of the center shaft and are in abutjoint with the two ends of the pressure spring tightly, and the pressure spring is pre-tightened; the left-hand moving screw cap and the right-hand moving screw cap are connected with sliding blocksthrough the inner hexagon nuts and the connecting rods, the two sliding blocks are matched with the guide rail, and under the pressure effect of the pressure spring, threads in the left-hand moving screw cap and the right-hand moving screw cap generate enough self locking.