Usually yes, with caveats.
As David Siegel's answer says, constitutionally, the federal government can prosecute anyone for a crime which has already been prosecuted at the state level. But that's only the beginning of the story.
Start with the US Attorney's manual. This manual is not, in and of itself, a law. However:
A. Statement of Policy: This policy establishes guidelines for the exercise of discretion by appropriate officers of the Department of Justice in determining whether to bring a federal prosecution based on substantially the same act(s) or transactions involved in a prior state or federal proceeding. See Rinaldi v. United States, 434 U.S. 22, 27, (1977); Petite v. United States, 361 U.S. 529 (1960). Although there is no general statutory bar to a federal prosecution where the defendant's conduct already has formed the basis for a state prosecution, Congress expressly has provided that, as to certain offenses, a state judgment of conviction or acquittal on the merits shall be a bar to any subsequent federal prosecution for the same act or acts. See 18 U.S.C. §§ 659, 660, 1992, 2101, 2117; see also 15 U.S.C. §§ 80a-36, 1282.
The purpose of this policy is to vindicate substantial federal interests through appropriate federal prosecutions, to protect persons charged with criminal conduct from the burdens associated with multiple prosecutions and punishments for substantially the same act(s) or transaction(s), to promote efficient utilization of Department resources, and to promote coordination and cooperation between federal and state prosecutors.
The boldfaced statement cites a number of specific laws which actually do bar federal prosecution following a state prosecution. Let's use 18 USC 659 (which they cite above) as an example:
[snip multiple paragraphs, which essentially amount to "stealing from an interstate or international cargo shipment is a crime."]
A judgment of conviction or acquittal on the merits under the laws of any State shall be a bar to any prosecution under this section for the same act or acts. Nothing contained in this section shall be construed as indicating an intent on the part of Congress to occupy the field in which provisions of this section operate to the exclusion of State laws on the same subject matter, nor shall any provision of this section be construed as invalidating any provision of State law unless such provision is inconsistent with any of the purposes of this section or any provision thereof.
I'm not sure why, but for some reason, Congress decided to combine two different provisions into one big paragraph:
- If a person is either acquitted or convicted "on the merits" (meaning the case actually produced some kind of verdict rather than having its charges dropped or something similar) in state court, then federal prosecution is barred.
- This law does not preempt state laws unless it directly conflicts with them in some way.
A provision essentially identical to #1 can be found in most of the above cited laws, but I was unable to find it in 18 USC 1992, and 15 USC 1282 has been repealed.
Anyway, let's go back to the manual. As mentioned before, it is not law, but it might as well be, because the Department of Justice is a very rules-oriented organization. It does not simply charge random people with random crimes whenever any US Attorney thinks they can win. There are processes to follow and rules to satisfy, and as quoted above, one of those rules pertains to prior state prosecutions. If the rule says not to prosecute someone, then that person very likely will not be prosecuted.
We can skip past several paragraphs of preliminaries to the meat of the policy, in section D. It is quite long, so I will not quote all of it, but here is my executive summary. There are three requirements:
- The case must "involve a substantial federal interest." The policy says relatively little about this but does cite another manual for more details.
- The state prosecution must have "left that interest demonstrably unvindicated." The policy goes into considerable detail about this, but in short, it's not about the result. It's about whether the state prosecution was demonstrably deficient in certain specific ways, or was frustrated by various problems not related to the defendant's guilt, or by external factors such as the availability of evidence. In principle, this requirement could be met even in the case of a conviction (the example given in the manual is "a state prosecution for assault and battery in a case involving the murder of a federal official").
- The government must believe that the defendant is actually guilty and that it can obtain a conviction. The manual says that "[t]his is the same test applied to all federal prosecutions." No surprises here - the DoJ is generally quite averse to bringing weak cases.
If all three requirements are met, the law does not have one of the specific statutory carve-outs listed above, and the non-substantive requirements of the policy are also met, then the DoJ can and will prosecute (subject to all of their other rules and procedures, of course).