The 13th amendment, which banned slavery and involuntary servitude, was actually established prior to Jim Crow laws. It had passed both houses of Congress by the end of January, 1865 and was ratified by the states on December 6th of that same year. It was the first of the three "reconstruction amendments"—the latter two providing equal protection under the law and the right to vote for all races, creeds and backgrounds. There was no need for Jim Crow prior to these amendments; rather the existence of these amendments is largely what brought about Jim Crow, as bitter Southerners became to regain their pre-Civil War culture.
Reconstruction (1865–1877), during which time these amendments were passed and implemented, coincided with white Southern Democrats slowly regaining legislative power. They would often use paramilitary groups and strong-arm tactics to interfere with Republican organizing, all with a goal of maintaining a kind of de facto status quo on racial segregation and the suppression of black rights. In a short time, they had amassed enough power to enact state and local laws designed to counteract the new federally-mandated freedoms that had emerged for blacks after the Civil War. This had an especially detrimental impact since the majority of blacks still lived in the South.
Jim Crow brought about the "separate but equal" doctrine, which was upheld by the Supreme Court and used as justification for racial segregation in all public facilities and modes of transportation throughout the late 19th and early 20th centuries. While the US military was already segregated at this time, President Woodrow Wilson additionally segregated federal workplaces in 1913 at the urging of Southern cabinet members. Also, as blacks started being elected to political office, Democrats passed laws and election rules design to reduce black voter participation (e.g., poll taxes, literacy tests, and residency requirements). Those who couldn't vote likewise couldn't hold public office or serve on juries.
Jim Crow essentially institutionalized social and economic disparities and disadvantages in an effort to negate the 13th amendment and make blacks second-class citizens. Facilities and opportunities for blacks were vastly inferior to those for whites. Public libraries and schools built specifically for blacks, for example, were grossly underfunded and stocked with secondhand materials (if such facilities existed at all). And while many of these laws also impacted poorer whites, loopholes were created that exempted most white European-Americans from the same rules imposed on blacks.
While there were countless efforts to cut the teeth out of Jim Crow, these laws still continued in some form or fashion for nearly 100 years until passage of the Civil Rights Act of 1964 and Voting Rights Act of 1965.