An accelerometer doesn't measure motion: it measures change in motion. Or more accurately, it measures the derivative of velocity. So, when your accelerometer begins to move in a direction, you can detect that. But once you are moving, and you are no longer accelerating, to the accelerometer, it might as well be sitting on your desk. The only thing you will be measuring is noise and the constant acceleration of gravity.
An analogy would be this: if you can't see, and you can't hear wind and road noise, and the windows are up so you can't feel wind, how would you know you are in a moving car or a parked car?
Put another way, imagine a ball balanced on the top of your object. The accelerometer measures how the ball will move relative to the object as the object changes velocity.
You can not do what you describe with a practical accelerometer. When your object begins to move to the left, the accelerometer registers a force in one direction. When your object later stops moving, the accelerometer registers a force in the other direction. The problem is this: that force in the other direction is indistinguishable from the force you'd measure when your object begins to move to the right.
You are measuring the change in velocity. The change in velocity is the same in both these cases:
- moving left -> not moving
- not moving -> moving right
You can not distinguish them with an accelerometer. If you want to measure "moving left" and "moving right", that's velocity, not acceleration. You need a device that measures velocity. In theory, you can integrate acceleration to get velocity1, but practical details like noise and offset will cause your calculation of velocity to drift from the actual value.
1: an example of a system that does this is an inertial navigation system. These systems employ very careful engineering and expensive systems to reduce, but not eliminate drift.