Citizenship clause of the 14th Amendment, ratified in 1868.
Three years after slavery was abolished all freed slaves, and all of their descendants (and others) were made citizens.
Didn't apply to so called "Native Americans"
It existed in common law before that, but was put into the constitution to to override Dred Scott.