This present work explores the performance of a thermal–magnetic engine of Otto type, considering as a working substance an effective interacting spin model corresponding to the q− state clock model. We obtain all the thermodynamic quantities for the q = 2, 4, 6, and 8 cases in a small lattice size (3×3 with free boundary conditions) by using the exact partition function calculated from the energies of all the accessible microstates of the system. The extension to bigger lattices was performed using the mean-field approximation. Our results indicate that the total work extraction of the cycle is highest for the q=4 case, while the performance for the Ising model (q=2) is the lowest of all cases studied. These results are strongly linked with the phase diagram of the working substance and the location of the cycle in the different magnetic phases present, where we find that the transition from a ferromagnetic to a paramagnetic phase extracts more work than one of the Berezinskii–Kosterlitz–Thouless to paramagnetic type. Additionally, as the size of the lattice increases, the extraction work is lower than smaller lattices for all values of q presented in this study.