Magnetic phase switching in a coordination polymer is reported, which is demonstrated by combining two processes: (A) the pre-organization of magnetic/redox-active molecules into a framework, and (B) a post-treatment through electrochemical tuning of the pre-organized molecules. A TTF -TCNQ salt (TTF=tetrathiafulvalene; TCNQ=7,7,8,8-tetracyano-p-quinodimethane) was incorporated into a three-dimensional framework with paddlewheel-type dimetal(II, II) units ([M ]; M=Ru with S=1, 1; and Rh with S=0, 2), where the [M ] and TCNQ units form the coordinating framework, and TTF is located in the pores of framework, forming an irregular π-stacking alternating column with the TCNQ in the framework. In 1, the spins of [Ru ] and TCNQ units make a magnetic correlation through the framework upon decreasing the temperature from 300 K, which is, however, suddenly suppressed below 137 K (=T (1)) by the formation of a spin singlet in the TTF -TCNQ columns, as seen in the spin-Peierls transition (T (2)=200 K). This material was incorporated as a cathode in a Li-ion battery (LIB); a long-range ferrimagnetic correlation was formed through the three-dimensional [{Ru } TCNQ] framework at T =78 K in the discharge process. The reversible magnetic phase switching between the non-volatile ferrimagnetic and paramagnetic states, resulting from the local spin tuning of quasi-spin-Peierls singlet, is demonstrated through the discharge/charge cycling of the LIB.