DNA phase separation participates in chromatin packing for the modulation of gene transcription, but the induction of DNA phase separation in living cells for disease treatment faces huge challenges. Herein, we construct a Ru(II)-polypyridyl-loaded upconversion nanoplatform (denoted as UCSNs-R) to achieve the manipulation of DNA phase separation and production of abundant singlet oxygen (1O2) for efficient treatment of gliomas. The utilization of the UCSN not only facilitates high loading of Ru(II)-polypyridyl complexes (RuC) but also promotes the conversion of near-infrared (NIR) laser to ultraviolet light for efficient 1O2 generation. The released RuC exhibit DNA "light-switch" behavior and high DNA binding affinity that induce phase separation of DNA in living cells, thus resulting in DNA damage and suppressing tumor-cell growth. In vivo investigation demonstrates the high capability of UCSNs-R in inhibiting tumor proliferation under NIR laser illumination. This work represents a paradigm for designing a DNA phase separation nanoinducer through integration of the UCSN with Ru(II)-polypyridyl-based complexes for efficient therapy of gliomas.