We present the first search for $CPT$-violating effects in the mixing of ${B}_{s}^{0}$ mesons using the full Run II data set with an integrated luminosity of $10.4\text{ }\text{ }{\mathrm{fb}}^{\ensuremath{-}1}$ of proton-antiproton collisions collected using the D0 detector at the Fermilab Tevatron Collider. We measure the $CPT$-violating asymmetry in the decay ${B}_{s}^{0}\ensuremath{\rightarrow}{\ensuremath{\mu}}^{\ifmmode\pm\else\textpm\fi{}}{D}_{s}^{\ifmmode\pm\else\textpm\fi{}}$ as a function of celestial direction and sidereal phase. We find no evidence for $CPT$-violating effects and place limits on the direction and magnitude of flavor-dependent $CPT$- and Lorentz-invariance violating coupling coefficients. We find 95% confidence intervals of $\mathrm{\ensuremath{\Delta}}{a}_{\ensuremath{\perp}}<1.2\ifmmode\times\else\texttimes\fi{}{10}^{\ensuremath{-}12}\text{ }\text{ }\mathrm{GeV}$ and $(\ensuremath{-}0.8<\mathrm{\ensuremath{\Delta}}{a}_{T}\ensuremath{-}0.396\mathrm{\ensuremath{\Delta}}{a}_{Z}<3.9)\ifmmode\times\else\texttimes\fi{}1{0}^{\ensuremath{-}13}\text{ }\text{ }\mathrm{GeV}$.