We demonstrate the super-resolution localization of the nitrogen vacancy centers in diamond by a novel fluorescence photoswitching technique based on coherent quantum control. The photoswitching is realized by the quantum phase encoding based on pulsed magnetic field gradient. Then we perform super-resolution imaging and achieve a localizing accuracy better than 1.4 nm under a scanning confocal microscope. Finally, we show that the quantum phase encoding plays a dominant role on the resolution, and a resolution of 0.15 nm is achievable under our current experimental condition. This method can be applied in subnanometer scale addressing and control of qubits based on multiple coupled defect spins.