I saw many examples about filtering Accelermeter\'s values, to cancel out the gravity (High-pass filter).
But most of them were 1st order one, which is said to be simple
You can try a higher order FIR or IIR filter which could give you a sharper frequency domain transition. But a more advanced method is to use an adaptive Kalman filter. Here's one article on accelerometers and Kalman filters.