The situation is that the hinge pins do not sit plumb, meaning the hinge pins do not fall along a perfectly vertical line. It is as simple as that.
Remedying the situation is simply a matter of remounting the hinges on the jamb so that the hinge barrels/pins are plumb. This is not a matter of trial and error, but does require craftsmanship, an accurate level, and a straight edge that is in fact straight.
To be clear, the condition of the door itself is irrelevant. For example, it is irrelevant whether or the door is sagging or square, whether the door is warped or flat, and whether or not the door is attached to the hinges to be plumb. What matters is how the hinges are attached to the jamb: the hinge barrels need to sit along a plumb line if the door is to be stationary.
When hinge pins are out-of-plumb, a door will swing on its own due to gravity and come to rest in the unique position where center-of-mass of the door is lowest. In some cases, intentionally bending a hinge pin (or deforming a barrel) by striking the pin with a hammer will bind up the hinge, creating enough friction to resist this gravitational force.
In some situations, out-of-plumb hinges can be desirable. It is a means to make a door swing to a particular position when released, for example to a fully closed position, or to a fully open position, or to some midpoint. This is accomplished by mounting the hinges to the jamb in such a manner that the barrels lean in the direction of the desired resting place.
If the door is severely out of plumb, fixing it is an advanced project requiring expert removal of the casing and jambs, then rehanging it, essentially from scratch with several curve balls thrown in. This answer does not cover the case of doors that are severely out of plumb.
The following outline describes the steps for a door that is not severely out of plumb.
Remove the door by removing the hinge pins.
If the door uses more than two hinges, label and remove the middle jamb-leaf(s). If the hinges are painted, use a utility knife to score heartily around their perimeters to avoid paint from peeling off the jambs.
Select a straight edge (1x4 or plywood ripping) that is shorter than the doorway height, but long enough to reach from the floor to the top of the top hinge.
Measure the "out-of-plumbness" in two directions:
Measurement A: "out-of-plumbness" within the plane of the doorway
Measurement B: "out-of-plumbness" at 90 degrees to plane of the doorway.
- Hold an accurate level against the straight edge, and the straight edge against the hinge barrels.
- Tilt the straight edge away from the top or the bottom hinge barrel until the level indicates the straight is plumb.
- Use a ruler to measure the gap between the straight edge and the barrel.
Label and remove the hinge leafs from their mortises
Adjust the depths of the mortises to a total of Measurement A in whatever manner the situation calls for. For example, if Measurement A is 1/8", then
- chisel one mortise to be 1/8" deeper
- or shim the other mortise with 1/8" thick paperboard
- or chisel one mortise 1/16" and shim the other 1/16"
- or some other combination
Fill and pre-drill the screw holes to new locations totaling Measurement B in which ever combination the situation calls for. For example, if Measurement B is 1/8", then
- move one set of holes away from the barrel side by 1/8" and widen the mortise accordingly
- or move the other set of holes towards the barrel side by 1/8"
- or some combination
Reinstall the two hinge plates
Verify the two barrels are plumb in both directions, refine accordingly.
Remount the door onto the two hinges, re-verify that the door does not move on its own. If it does move, then either the straight edge does not have parallel sides, or the level is not accurate, or the workmanship is not precise. Revise accordingly.
If the door no longer fully closes, adjust the door-leafs and/or plane the door's edges to fit.
If the door no longer closes flat against the door stops, adjust the door-leafs and/or adjust the door stops accordingly.
If the door uses more than two hinges, then adjust the middle mortise(s) and their drill holes such that the barrel(s) will mount inline with the top and bottom hinge barrels.
- assuming the hinge stile of the door is straight, mount the loose jamb-leafs onto the door-leafs with the hinge pins.
- chisel/shim the mortise(s) and move+predrill their screw holes so that the jamb-leafs swing freely into their mortises.
Screw the middle jamb-leafs into the jambs