Osteoarthritis (OA) is a chronic degenerative disease that primarily includes articular cartilage destruction and inflammatory reactions, and effective treatments for this disease are still lacking. The present study aimed to explore the protective effects of ectoine, a compatible solute found in nature, on chondrocytes in rats and its possible application in OA treatment. In the in vitro studies, the morphology of the chondrocytes after trypsin digestion for 2 min and the viability of the chondrocytes at 50°C were observed after ectoine treatment. The reactive oxygen species (ROS) levels in chondrocytes pretreated with ectoine and post-stimulated with H2O2 were detected using an ROS assay. Chondrocytes were pretreated with ectoine before IL-1β stimulation. RT‒qPCR was used to measure the mRNA levels of cyclooxygenase-2 (COX-2), metallomatrix proteinase-3, -9 (MMP-3, -9), and collagen type II alpha 1 (Col2A1). In addition, immunofluorescence was used to assess the expression of type II collagen. The in vivo effect of ectoine was evaluated in a rat OA model induced by the modified Hulth method. The findings revealed that ectoine significantly increased the trypsin tolerance of chondrocytes, maintained the viability of the chondrocytes at 50°C, and improved their resistance to oxidation. Compared with IL-1β treatment alone, ectoine pretreatment significantly reduced COX-2, MMP-3, and MMP-9 expression and maintained type II collagen synthesis in chondrocytes. In vivo, the cartilage of ectoine-treated rats exhibited less degeneration and lower Osteoarthritis Research Society International (OARSI) scores. The results of this study suggest that ectoine exerts protective effects on chondrocytes and cartilage and can, therefore, be used as a potential therapeutic agent in the treatment of OA.