Along with global aging, osteoarthritis (OA) appears to have a high incidence and disability rate, which seriously affects the quality of life of patients, making age a major risk factor. However, the pathology of OA is under-researched, and there is no obvious and effective treatment. Research has demonstrated the importance of aging, inflammation, and immunology in the onset and course of OA. This study aims to anticipate therapeutic drugs based on critical genes associated with OA and to elucidate the roles of genes and possible biomarkers associated with inflammation, immunology, and cellular senescence in OA. The OA gene expression matrix was first obtained from the Gene Expression Omnibus database. Screening for OA significant differentially expressed genes by bioinformatics identification. Specific biological processes and related signaling pathways of the differential genes were enriched. Then elucidate the status of immune cell involvement in OA based on immune infiltration analysis. Finally predict therapeutic agents based on pivotal genes. A total of 198 differentially expressed genes were identified in OA, and TP53, EGFR, TGFB1, LEP, CD4, MAPK8, SCARB1, ADIPOQ, JAK2, and SERPINE1 were further identified as important hub genes. The enrichment results showed that the development of arthritis was mainly related to immune cell differentiation, amino acid metabolism and cellular senescence process. The validation of immune infiltration results indicated that NK_cells, CD4_Tcells, Macrophages, Monocytic_lineage, Dendritic_cells, Basophils, CD8+_naive_T-cells may play an important role in the immune process of OA. Key Drug Prediction of Hub Genes found that Halicin, Ruxolitinib, Tofacitinib, Clenoliximab, Baricitinib may be a key drug or component in the treatment of OA.