When the gun recoils backward the mercury, contained in a tube, doesn't "move". The tube moves backward and "collides" with the mercury, which has the effect of damping recoil and muzzle flip because the mass of the mercury is shifted to the forward part of the tube - moving the tube's center of gravity forward (toward the muzzle).
Years ago I had a Haarts recoil reducer (mercury filled hollow recoil spring rod) in my Beretta 96FS. I couldn't tell any difference and I sold it. It probably worked better in 1911s, which have a thicker guide rod. (IIRC the Haart's recoil reducer may have also contained ball bearings too.)
I also believe Haarts made a mercury filled recoil reduced for shotgun buttstocks but I don't have any experience, nor do I know anyone who had one.