We study the spin-dependent in-medium dynamics of quarkonia by using the potential nonrelativistic QCD (pNRQCD) and the open quantum system framework. We consider the pNRQCD Lagrangian valid up to the order rM0=r and r0M=1M in the double power counting. By considering the Markovian condition and applying the Wigner transformation upon the diagonal spin components of the quarkonium density matrix with the semiclassical expansion, we systematically derive the Boltzmann transport equation for quarkonia with polarization dependence in the quantum optical limit. Unlike the spin-independent collision terms governed by certain chromoelectric field correlators, new gauge invariant correlators of chromomagnetic fields determine the recombination and dissociation terms with polarization dependence at the order we are working. We also derive a Lindblad equation describing the in-medium transitions between spin-singlet and spin-triplet heavy quark-antiquark pairs in the quantum Brownian motion limit. The Lindblad equation is governed by new transport coefficients defined in terms of the chromomagnetic field correlators. Our formalism is generic and valid for both weakly coupled and strongly coupled quark gluon plasmas. It can be further applied to study spin alignment of vector quarkonia in heavy ion collisions. Published by the American Physical Society 2024