This is apparently very hypothethal question. According to the answers to the question "Could a state legalize murder?", theoretically, a U.S. state could legalize murder (of course, it would not affect the federal law which also criminalizes murder, but only in specific cases). However, it was suggested that a state could not do that in a discriminatory way. For example, if a state legalized killing of black people, but kept killing of white people a crime, it would apparently be unconstitutional and violate the Equal Protection Clause.
If a U.S. state passed such a law and someone challenged it before the courts, how could the court remedy that?
Since the state is not obligated to criminalize murder (and even when the state criminalizes murder, it may use prosecutorial / enforcement discretion), I guess that the court could not simply strike down the exception for one race and order the state government to prosecute murder of both races or to change the law.
Would the court have any other option than to simply strike down the entire murder law as unconstitutional, thus effectively legalizing all murders in that state?