Merging compact black-hole (BH) binaries are likely to exist in the nuclear star clusters around supermassive BHs (SMBHs), such as Sgr A$^ast$. They may also form in the accretion disks of active galactic nuclei. Such compact binaries can emit gravitational waves (GWs) in the low-frequency band (0.001-1 Hz) that are detectable by several planned space-borne GW observatories. We show that the orbital axis of the compact binary may experience significant variation due to the frame-dragging effect associated with the spin of the SMBH. The dynamical behavior of the orbital axis can be understood analytically as a resonance phenomenon. We show that rate of change of the binary orbital axis encodes the information on the spin of the SMBH. Therefore detecting GWs from compact binaries around SMBHs, particularly the modulation of the waveform associated with the variation of the binary orbital axis, can provide a new probe on the spins of SMBHs.