The present study investigated the effectiveness of celecoxib in preventing the formation of joint adhesions. Rabbit models of joint adhesion were created and the rabbits in two treatment groups were orally administered celecoxib or ibuprofen (as a positive control) for 30 days. Rabbits in the control group did not receive any treatment. Following the 30-day experimental period, the inhibitory effects of celecoxib and ibuprofen on the formation of joint adhesion were assessed using a number of methods, including the study of macroscopic appearance, histology and contracture angle. Thick fibrous adhesions developed in the knees of the rabbits in the control group. By contrast, few adhesions were observed in the two treatment groups, and those observed were soft, weak and easily stretched. Fewer adhesions were observed in the rabbits treated with celecoxib than in the rabbits in the other groups. The adhesion scores and contracture angles in the celecoxib (P<0.001) and ibuprofen (0.001<P<0.0025) groups were significantly lower than those of the control group. Moreover, the adhesion scores and contracture angles were significantly lower in the celecoxib group than in the ibuprofen group (0.025<P<0.05). Histologically, the adhesion tissues in the two treatment groups, particularly in the celecoxib group, were loose and thin with sparse fiber formation. The cell densities in the two treatment groups, of which the ibuprofen group had higher cell densities (0.025<P<0.05), were significantly lower than those in the control group (celecoxib group, P<0.001; ibuprofen group, 0.001<P<0.0025). These results indicated that celecoxib effectively inhibited the formation of joint adhesions and therefore may provide a novel and potent approach for their prevention.