The following excerpt is from James v. Walsh, 308 F.3d 162 (2nd Cir. 2002):
Section 2254 permits a state prisoner to file a habeas petition "on the ground that he is in custody in violation of the Constitution or laws or treaties of the United States." 28 U.S.C. 2254(a). A claim that one is "in custody" in violation of federal laws is broader than a claim that the imposition of one's sentence is illegal. A federal due process challenge claiming state incarceration beyond that authorized by a judgment and sentence would fall within this broader category of claims. See McGinnis v. United States ex rel. Pollack, 452 F.2d 833 (2d Cir.1971) (affirming a grant of Section 2254 relief to a state prisoner seeking a recomputation of his latest release date). The plain language of the pertinent statutes indicates, therefore, that a federal prisoner may challenge the imposition, but not the execution, of a sentence under Section 2255, while a state prisoner may challenge either the imposition or the execution of a sentence under Section 2254.
The above passage should not be considered legal advice. Reliable answers to complex legal questions require comprehensive research memos. To learn more visit www.alexi.com.