A locked doorknob is not any more difficult to remove than an unlocked one, unless it is a bolt lock that has a broken locking mechanism. In that case, you will need to call a locksmith or risk damaging the door. Such cases are rare. Usually, it is a simple matter to remove a locked doorknob, as long as you have a screwdriver and a little time.
Press the detent to release the knob mechanism. To do this, use a thin screwdriver to depress the detent. You can find it on the underside of the doorknob as shown in the picture above. Press in the detent and pull the knob off at the same time. If there is no detent, move on to Step 2.
Remove the doorknob trim or faceplate. This is the metal that surrounds the knob. If you see screws, you can simply remove the screws and pull the ring off. If there are no screws, you will have to pry it off using the thin screwdriver. Slide the screwdriver as much as possible under the metal before prying it off.
Remove the doorknob. If there is no detent on your doorknob, you will have to look for two long screws holding your knobs in place. You should be able to see them once the trim has been removed. Remove them and you will be able to completely remove both the inner and outer knobs.
Remove the cylinder and locking mechanism. Now that the knobs and trim are gone, you should be able to see the locking cylinder. There are two screws that hold the cylinder in place. Remove the screws, and you should be able to slide out both the cylinder and the locking bolt.
Replace the doorknob as soon as possible. A door without a doorknob will not close properly.
Be careful when prying off trims, or you may damage the door.