Using three waves (2011–15) of CHARLS data, we analyze the short-term effects of widowhood on cognitive function among older Chinese. Fixed-effect models show that widowhood has significant adverse effects on cognition for rural elders but not for urban ones. Furthermore, compared to rural men, rural women exhibit greater declines in cognition, especially in fluid cognition. We explore the possible mechanism from the neighborhood perspective. The results show that community sports and entertainment facilities and public services can effectively mitigate the negative impact of widowhood on cognitive function for rural widows. Sports and entertainment facilities can mainly enhance word recall ability, especially delayed word recall. Public services such as elderly health centers focusing on the healthcare function for the elderly can also improve the word recall ability of rural widows. On the other hand, family-based elderly care centers mainly increase the cognition ability of mental intactness.