A new finite-difference method for the numerical simulation of compressible MHD flows is presented, which is applicable to a broad class of problems. The method relies on the magnetic quasi-gasdynamic equations (referred to as quasi-MHD (QMHD) equations), which are, in fact, the system of Navier–Stokes equations and Faraday’s laws averaged over a short time interval. The QMHD equations are discretized on a grid with the help of central differences. The averaging procedure makes it possible to stabilize the numerical solution and to avoid additional limiting procedures (flux limiters, etc.). The magnetic field is ensured to be free of divergence by applying Stokes’ theorem. Numerical results are presented for 3D test problems: a central blast in a magnetic field, the interaction of a shock wave with a cloud, and the three-dimensional Orszag–Tang vortex. Additionally, preliminary numerical results for a magnetic pinch in plasma are demonstrated.