A methodology is developed to integrate numerically the equations of motion for classical many-body systems in molecular dynamics simulations. Its distinguishable feature is the possibility to preserve, independently on the size of the time step, all the conservation laws inherent in the description without breaking the time reversibility. As a result, an implicit second-order algorithm is derived and applied to pure liquids, as well as spin liquids, for which the dynamics is characterized by the conservation of total energy, linear and angular momenta, as well as magnetization and individual spin lengths. It is demonstrated on the basis of Lennard-Jones and Heisenberg fluid models that when such quantities as energy and magnetization must be conserved perfectly, the algorithm turns out to be more efficient than popular decomposition integrators and standard predictor-corrector schemes.