Cancer immunotherapy is a promising therapeutic approach, but the prognostic value of immune-related genes in osteosarcoma (OS) is unknown. Here, Target-OS RNA-seq data were analyzed to detect differentially expressed genes (DEGs) between OS subgroups, followed by functional enrichment analysis. Cox proportional risk regression was performed for each immune-related gene, and a risk score model to predict the prognosis of patients with OS was constructed. The risk scores were calculated using the risk signature to divide the training set into high-risk and low-risk groups, and validation was performed with GSE21257. We identified two immune-associated clusters, C1 and C2. C1 was closely related to immunity, and the immune score was significantly higher in C1 than in C2. Furthermore, we validated 6 immune cell hub genes related to the prognosis of OS: CD8A, KIR2DL1, CD79A, APBB1IP, GAL, and PLD3. Survival analysis revealed that the prognosis of the high-risk group was significantly worse than that of the low-risk group. We also explored whether the 6-gene prognostic risk model was effective for survival prediction. In conclusion, the constructed a risk score model based on immune-related genes and the survival of patients with OS could be a potential tool for targeted therapy.