"black man," 1838, American English, originally the name of a black minstrel character in a popular song-and-dance act by T.D. Rice (1808-1860) that debuted 1828 and attained national popularity by 1832:
Wheel about, an' turn about, an' do jis so;
Eb'ry time I wheel about, I jump Jim Crow.
Where and how Rice got it, or wrote it, is a mystery. Even before that, crow (n.) had been a derogatory term for a black man. As an adjective from 1833, in reference to the song. Association with segregation dates from 1841, in reference to separate railroad cars for blacks in Massachusetts. Modern use as a type of racial discrimination is from 1943. Jim Crow also could be a reference to someone's change of (political) principles (1837, from the "jump" in the song) or reversible machinery (1875, "wheel about").
On his arrival in Boston, Mr. [Charles Lenox] R[emond] went to the Eastern rail-road depot, in order to visit his parents in Salem; but, instead of being allowed to ride with other passengers, he was compelled to take a seat in what is contemptuously called the "Jim Crow car," as though he were a leper or a wild animal! [Annual Report of the Massachusetts Anti-Slavery Society, 1842]