Osteoarthritis (OA) is a non-inflammatory degenerative joint disease that mainly involves articular cartilage damage and involves the whole joint tissue. Gastritis is a common stomach disorder, typically referring to inflammation or lesions of the gastric mucosa. However, the relationship between CD14 and colony stimulating factor-1 receptor (CSF1R) and these 2 diseases is not yet clear. OA datasets GSE46750, GSE82107 and gastritis datasets GSE54043 profiles were downloaded from gene expression omnibus databases generated by GPL10558 and GPL570.The R package limma was used to screen differentially expressed genes (DEGs). Weighted gene co-expression network analysis was performed. The construction and analysis of protein–protein interaction network, functional enrichment analysis, gene set enrichment analysis and comparative toxicogenomics database analysis were performed. TargetScan was used to screen miRNAs regulating central DEGs. A total of 568 DEGs were identified. According to the gene ontology (GO) and biological processes analysis, they were mainly enriched in ATP metabolism negative regulation, toll-like receptor TLR1:TLR2 signaling pathway, and intracellular transport. The enrichment terms for OA and gastritis were similar to the GO and Kyoto encyclopedia of gene and genome enrichment terms of DEGs, mainly enriched in ATP metabolism negative regulation, secretion granules, transmembrane receptor protein kinase activity, cytokine–cytokine receptor interaction, Toll-like receptor signaling pathway, MAPK signaling pathway, and TGF-β signaling pathway. In the Metascape enrichment projects, GO enrichment projects showed functions related to cell–cell receptor interaction, cell secretion, and growth. Two core genes were identified through the construction and analysis of the protein–protein interaction network. The core genes (CD14 and CSF1R) exhibited high expression in OA and gastritis samples and low expression in normal samples. Comparative toxicogenomics database analysis revealed associations between core genes (CD14 and CSF1R) and diseases such as OA, osteoporosis, gastritis, juvenile arthritis, diarrhea, and inflammation. CD14 and CSF1R are highly expressed in OA and gastritis, making them potential therapeutic targets for both diseases.