Objective Hydroxychloroquine (HCQ), characterized by a broad effect on immune regulation, has been widely used in the treatment of autoimmune glomerulonephritis such as lupus nephritis (LN) and immunoglobulin A nephropathy (IgAN). The current research investigates whether HCQ plays a role in the treatment of LN and IgAN through common mechanisms since the pathogenesis of both LN and IgAN is closely related to immune complex deposition, complement activation, and ultimately inflammation. Methods Seventy-two common targets were obtained related to the common mechanism of HCQ treatment of LN and IgAN. Targets associated with LN and IgAN were collected based on DisGeNET, GeneCards, and OMIM databases. Possible HCQ targets were obtained from the PubChem database and PharmMapper databases. The overlapping targets of HCQ ingredients, IgAN, and LN were discovered via the Venn 2.1.0 online platform. Through the DAVID database, the Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) analyses were conducted. Cytoscape (v3.9.1) was used to build a protein–protein interaction (PPI) network. Molecular docking was performed by using AutoDockTools 1.5.6 software and PyMol software to match the binding activity between HCQ and the 10 core targets. Results The results showed that core targets (including MMP 2, PPARG, IL-2, MAPK14, MMP 9, and SRC), three signaling pathways (including the PI3K-Akt, AGE-RAGE, and MAPK), and cell differentiation (including Th1, Th2, and Th17) might be related to the body’s immunity and inflammation. These results suggested that HCQ might act on targets and pathways involved in inflammation and immune regulation to exert a common effect on the treatment of LN and IgAN. Conclusions The current study provided new evidence for the protective mechanism and clinical utility of HCQ against LN and IgAN.