The molecular mechanisms of osteoarthritis, the most common chronic disease, remain unexplained. This study aimed to use bioinformatic methods to identify the key biomarkers and immune infiltration in osteoarthritis. Gene expression profiles (GSE55235, GSE55457, GSE77298, and GSE82107) were selected from the Gene Expression Omnibus database. A protein-protein interaction network was created, and functional enrichment analysis and genomic enrichment analysis were performed using the Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genome (KEGG) databases. Immune cell infiltration between osteoarthritic tissues and control tissues was analyzed using the CIBERSORT method. Identify immune patterns using the ConsensusClusterPlus package in R software using a consistent clustering approach. Molecular biological investigations were performed to discover the important genes in cartilage cells. A total of 105 differentially expressed genes were identified. Differentially expressed genes were enriched in immunological response, chemokine-mediated signaling pathway, and inflammatory response revealed by the analysis of GO and KEGG databases. Two distinct immune patterns (ClusterA and ClusterB) were identified using the ConsensusClusterPlus. Cluster A patients had significantly lower resting dendritic cells, M2 macrophages, resting mast cells, activated natural killer cells and regulatory T cells than Cluster B patients. The expression levels of TCA1, TLR7, MMP9, CXCL10, CXCL13, HLA-DRA, and ADIPOQSPP1 were significantly higher in the IL-1β-induced group than in the osteoarthritis group in an in vitro qPCR experiment. Explaining the differences in immune infiltration between osteoarthritic tissues and normal tissues will contribute to the understanding of the development of osteoarthritis.