He joined the Republican party because it was the party because the party stood for freedom and supported civil rights for African Americans.
The Democrats on the other hand were for segregation and Jim Crow laws.
From Human Events
And as one pundit so succinctly stated, the Democrat Party is as it always has been, the party of the four S's: slavery, secession, segregation and now socialism.
It was the Democrats who fought to keep blacks in slavery and passed the discriminatory Black Codes and Jim Crow laws. The Democrats started the Ku Klux Klan to lynch and terrorize blacks. The Democrats fought to prevent the passage of every civil rights law beginning with the civil rights laws of the 1860s, and continuing with the civil rights laws of the 1950s and 1960s.
During the civil rights era of the 1960s, Dr. King was fighting the Democrats who stood in the school house doors, turned skin-burning fire hoses on blacks and let loose vicious dogs. It was Republican President Dwight Eisenhower who pushed to pass the Civil Rights Act of 1957 and sent troops to Arkansas to desegregate schools. President Eisenhower also appointed Chief Justice Earl Warren to the U.S. Supreme Court, which resulted in the 1954 Brown v. Board of Education decision ending school segregation.