I suspect he's related to the other Carters buried with him in Rural Cemetery, Charlestown, PA. Charlestown then and now is a tiny town.
Since he is Daniel W. Carter and there's a C. Wesley Carter also born in 1835, perhaps that's his middle name as well. Unfortunately Wesley doesn't have parents attached on Findagrave yet.
Most of the Carter profiles in that cemetery are descendants of an Edward Carter in the right generation to be his grandfather or great-uncle. Edward's two brothers ended up in Maryland and no child profiles are connected to them on Findagrave, whereas Edward Carter stayed in Chester County. I'd try to figure out who the other unlinked Carters are children of in 1850, and whether his brothers had sons.
The 1850 census, when Daniel was a teenager, would be key to trying to connect him to family. I couldn't find him, but here is an Ancestry link to all Carter records in Chester County in the 1850s; you can go through and take note of who is around the right age to be a parent or a sibling for additional research (maybe someone has a will naming a brother or son Daniel) and also closely look to see if "Daniel" was just not transcribed correctly on the Census or perhaps under a different first name if he was a laborer in another household--maybe even in Maryland with extended family.