Let \(\mathcal {A}\) and \(\mathfrak {B}\) be unital \(*\) -algebras such that \(\mathcal {A}\) has a nontrivial projection. In this present article, we demonstrate, under certain restrictions that if a bijective map \(\Omega :\mathcal {A}\rightarrow \mathfrak {B}\) satisfies \(\Omega ([E^{*}\circ F, G]^*)=[\Omega (E)^{*}\circ \Omega (F), \Omega (G)]^*\) for all \(E, F, G \in \mathcal {A}\) , then \(\Omega \) is a \(*\) -preserving ring isomorphism. Also, this result is applied to factor von Neumann algebras.