Canine pyometra, which is accompanied by bacterial contamination of the dog uterus, is defined as a complex disease associated with the activation of several systems, including the immune system. This study uses text mining and microarray data analysis methods to discover some existing targeted gene drugs and expand potential new drug indications. Text mining (“canine pyometra”) and microarray data analysis (GSE99877) were used to obtain a common set of genes. These genes and protein-protein interaction (PPI) networks were analyzed using Gene Ontology and the Kyoto Encyclopedia of Genes and Genomes. Then, the important genes clustered in the PPI network were selected for gene-drug interaction analysis to provide evidence for potential drug discovery. Through text mining and data analysis, we obtained 17,544 text mining genes (TMGs) and 399 differentially expressed genes (DEGs), respectively. There were 256 repeat genes between TMGs and DEGs, including 70 upregulated genes and 186 downregulated genes. Thirty-seven genes clustered in three significant gene modules. Eight of the 37 genes can target 23 existing drugs. In conclusion, the discovery of 8 immune response-related genes (BTK, CSF2RA, CSF2RB, ITGAL, NCF4, PLCG2, PTPRC, and TOP2A) targeting 23 existing drugs may expand the drug indications for pyometra-related diseases in dogs.