In the setting of quaternionic Heisenberg group scriptHn−1$\mathcal H^{n-1}$, we characterize the boundedness and compactness of commutator false[b,scriptCfalse]$[b,\mathcal {C}]$ for the Cauchy–Szegö operator C$\mathcal {C}$ on the weighted Morrey space Lwp,0.16emκ(scriptHn−1)$L_w^{p,\,\kappa }(\mathcal H^{n-1})$ with p∈false(1,∞false)$p\in (1, \infty )$, κ∈false(0,1false)$\kappa \in (0, 1)$, and w∈Ap(scriptHn−1)$w\in A_p(\mathcal H^{n-1})$. More precisely, we prove that false[b,scriptCfalse]$[b,\mathcal {C}]$ is bounded on Lwp,0.16emκ(scriptHn−1)$L_w^{p,\,\kappa }(\mathcal H^{n-1})$ if and only if b∈BMOfalse(Hn−1false)$b\in {\rm BMO}(\mathcal H^{n-1})$. And false[b,scriptCfalse]$[b,\mathcal {C}]$ is compact on Lwp,0.16emκ(scriptHn−1)$L_w^{p,\,\kappa }(\mathcal H^{n-1})$ if and only if b∈VMOfalse(Hn−1false)$b\in {\rm VMO}(\mathcal H^{n-1})$.