The U.S. Supreme Court determined in "Tarble’s Case (1872) . . . that state courts lack the power to issue habeas corpus to challenge the lawfulness of detention by federal officials."
The rule isn't surprising, given the way that American federalism has evolved and the context of the case in the Reconstruction Era when the South was emerging from military rule by the North in the wake of the Civil War, a low point in federal trust of state institutions. But, it is a notable case because it sets forth an important black letter rule of criminal procedure and federalism.