Confusing stepper motor behavior
The described behaviour could happen if, e.g. X_STEP_PIN, X_DIR_PIN and X_ENABLE_PIN are not correctly mapped.
I guess you will find them in pins_RAMPS_144.h. Make sure the correct file is used.