The connection between Yang-Mills gauge fields on 4-dimensional orientable compact Riemannian manifolds and modified Lévy Laplacians is studied. A modified Lévy Laplacian is obtained from the Lévy Laplacian by the action of an infinite dimensional rotation. Under the assumption that the 4-manifold has a nontrivial restricted holonomy group of the bundle of self-dual 2-forms, the following is proved. There is a modified Lévy Laplacian such that a parallel transport in some vector bundle over the 4-manifold is a solution of the Laplace equation for this modified Lévy Laplacian if and only if the connection corresponding to the parallel transport satisfies the Yang-Mills self-duality (anti-self-duality) equations. An analogous connection between the Laplace equation for the Lévy Laplacian and the Yang-Mills equations was previously known.