The origin of the phrase are in a racist caricature.
Step-by-step explanation:
The phrase 'Jim Crow ' is said to have been originated in the time of the presidency of Andrew Jackson.
This is from a play of the time that was being performed in song and dance by the actor who was white Thomas D Rice who did it in black face. It was called Jump Jim Crow.
This was made to oppose the populist policies of the president Andrew Jackson and this had been something that had been in undercurrents for a long time.
This is the reason the law is called that.