Great efforts have led to successfully developing the spike-based vaccines but challenges still exist to completely terminate the SARS-CoV-2 pandemic. SARS-CoV-2 nucleocapsid (N) protein plays the essential roles in almost all key steps of the viral life cycle, thus representing a top drug target. Almost all key functions of N protein including liquid-liquid phase separation (LLPS) depend on its capacity in interacting with nucleic acids. Therefore, only the variants with their N proteins functional in binding nucleic acids might survive and spread in evolution and indeed, the residues critical for binding nucleic acids are highly conserved. Very recently, hydroxychloroquine (HCQ) was shown to prevent the transmission in a large-scale clinical study in Singapore but so far, no specific SARS-CoV-2 protein was experimentally identified to be targeted by HCQ. Here by NMR, we unambiguously decode that HCQ specifically binds NTD and CTD of SARS- CoV-2 N protein with Kd of 112.1 and 57.1 μM respectively to inhibit their interaction with nucleic acid, as well as to disrupt LLPS essential for the viral life cycle. Most importantly, HCQ-binding residues are identical in SARS-CoV-2 variants and therefore HCQ is likely effective to them all. The results not only provide a structural basis for the anti-SARS-CoV-2 activity of HCQ, but also renders HCQ to be the first known drug capable of targeting LLPS. Furthermore, the unique structure of the HCQ-CTD complex decodes a promising strategy for further design of better anti-SARS-CoV-2 drugs from HCQ. Therefore, HCQ is a promising candidate to help terminate the pandemic.