The doctrine of incorporation uses the 14th Amendment to apply the Bill of Rights to the states.
When the Bill of Rights was originally written and ratified, it applied only to the federal government and not to the state governments. This is why the amendments say things like “Congress shall make no law…” The states were free to violate rights like free speech if they wanted to. There was little concern about this at the time because people felt that the federal government would be more likely to oppress people than the states would be.
After the Civil War, the 14th Amendment was drafted and ratified. The amendment says, in part, that no state can “deprive any person of life, liberty, or property, without due process of law.” This due process clause has been used to apply the Bill of Rights to the states. The logic here is that states may not take away people’s liberty without due process. Liberty, by this reasoning, includes things like the freedom of speech and the right to an attorney if one is accused of a crime. Therefore, the states cannot take these things away from people.
In this way, the Supreme Court has used the words of the Due Process Clause of the 14th Amendment to say that the Bill of Rights applies to the states as well as to the federal government.