The three amendments passed in the wake of the Civil War, sometimes collectively referred to as the "Reconstruction Amendments," intended to improve the rights of African-Americans throughout the nation. These amendments did leave open some legal loopholes that former slave states exploited, however.
The 13th Amendment forbade the practice of slavery in the United States. The former slave states responded to it with legal challenges, however, and passed a series of laws called the Black Codes that disenfranchised African-American residents in various ways.
The existence of the Black Codes led Congress to revisit the issue of civil rights and to ultimately pass the 14th and 15th Amendments. The 14th Amendment granted citizenship to all persons born in the United States and extended equal protection under the law regardless of race. It also addressed the right to vote, removing Congressional representation from states that prevented their citizens from doing so. The 15th Amendment took voting rights even further, guaranteeing them to citizens regardless of race, color or former slave status.
The 14th and 15th Amendments did not completely prevent states from disenfranchising African-American voters, however. States were still able to institute measures that disproportionately kept African-Americans away from the polls, such as poll taxes and literacy tests.