Sometimes when states fail to prosecute, or fail to get a conviction, the Feds will prosecute. But the original crime might not be a federal crime, so they prosecute under something else (there are ~3000 federal laws to choose from).
For example, sometimes when police kill citizens, and DAs don't prosecute, the Feds will. But the murder isn't in federal jurisdiction, so they charge them with "color of law"[2][3], which is a federal crime.
[1] https://en.wikipedia.org/wiki/Murder_(United_States_law)#Jur...
[2] https://en.wikipedia.org/wiki/Color_(law)
[4] https://www.justice.gov/crt/deprivation-rights-under-color-l...