Aims. This study aimed, through bioinformatics analysis, to identify the potential diagnostic markers of osteoarthritis, and analyze the role of immune infiltration in synovial tissue. Methods. The gene expression profiles were downloaded from the Gene Expression Omnibus (GEO) database. The differentially expressed genes (DEGs) were identified by R software. Functional enrichment analyses were performed and protein-protein interaction networks (PPI) were constructed. Then the hub genes were screened. Biomarkers with high value for the diagnosis of early osteoarthritis (OA) were validated by GEO datasets. Finally, the CIBERSORT algorithm was used to evaluate the immune infiltration between early-stage OA and end-stage OA, and the correlation between the diagnostic marker and infiltrating immune cells was analyzed. Results. A total of 88 DEGs were identified. Gene ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) enrichment analyses indicated that DEGs were significantly enriched in leucocyte migration and interleukin (IL)-17 signalling pathways. Disease ontology (DO) indicated that DEGs were mostly enriched in rheumatoid arthritis. Six hub genes including FosB proto-oncogene, AP-1 transcription factor subunit (FOSB); C-X-C motif chemokine ligand 2 (CXCL2);