Based on your description alone, it sounds as if you have what is called a "Boxer's knuckle".
It often affects the middle finger, and can happen to "non-boxers", I am a ringside physician, so I see this fairly often. It is due to an injury to the tendon sheath over the knuckle. When you make a fist the tendon slips to the side. If it hurts, see your Dr. (preferably sports med or hand/ortho Dr)