This study examined the development of children’s sharing behaviour towards friends and strangers using dictator games with a longitudinal design in a sample of rural Chinese children (n = 589, 47.0% girls) at 3–4 years old and 2 years later (n = 453, 44.2% girls). Results showed that the willingness to share and the amount of sharing changed over time and were affected by family structure. Only children shared fewer stickers than non-only children at ages 3–4, but the amount they shared did not differ at ages 5–6. Only children may develop reciprocal friendships at an older age due to their lack of experience with siblings. Children shared more stickers with friends than strangers at ages 3–4, and such ingroup bias became stronger at ages 5–6.