compulsion
A powerful feeling that you must do something, even unnecessarily.
Compulsion is a powerful inner force that makes you feel you absolutely must do something, even when part of you knows it doesn't make sense. It's stronger than just wanting something: it's feeling driven or pushed to do it.
Someone with a compulsion to check that the door is locked might go back five times even though they know they already locked it. A student might feel a compulsion to arrange their pencils in perfect order before starting homework, unable to focus until everything is just right. These aren't choices that feel free: they feel necessary, almost like an itch you have to scratch.
People sometimes talk about feeling “compelled” to do something good, like helping someone in trouble. In that case, a strong sense of what's right can give you that same driven feeling.
Compulsive behavior means acting on these inner pushes repeatedly. A compulsive liar can't seem to stop lying even when the truth would work better. When compulsions start interfering with normal life, people can work with doctors or counselors to understand them and find relief.