Aim. This article is a report on a pilot study conducted to determine the effects of cognitively stimulating activities in older patients undergoing elective hip and/or knee replacement. Background. Cognitive decline occurs in 16-35·5% of older hospitalized patients. In-hospital interventions, such as cognitively stimulating activities, might combat cognitive decline. However, evidence supporting such interventions is limited. Methods. For this randomized pilot trial, 50 older patients (90% women with a mean age of 72·8years) were recruited in 2008 from a tertiary medical centre in Taiwan. While hospitalized, participants in the intervention group received a daily nurse-led, individual-based, cognitive-stimulation intervention. The comparison group received usual care. Cognitive function was assessed using Mini-Mental State Examination at admission, discharge and 1month after discharge. Results. The incidence of cognitive decline (≥2-point decline in cognitive score) by hospital discharge was significantly lower for the intervention group (12%) than the usual care group (44%). The intervention group also had better cognitive scores following hospitalization. Upon discharge, participants in the intervention group scored 1·28 points higher than at admission, whereas participants in the usual care declined by 0·76 points. Improvement in cognitive status persisted for the intervention group (+1·33 points) vs. usual care (-0·26 points) at 1month after discharge. Group differences in changes were statistically significant both at discharge and 1month afterwards. Conclusion. Our cognitive-stimulation intervention benefited global cognitive function among older patients undergoing elective hip and/or knee replacement. The benefit persisted at 1month after discharge.