Can a defendant challenge the constitutionality of the statute s/he is charged with violating
<p>If someone is accused of a crime in his or her state and s/he believes the statute s/he is being charged under violates one or more of his or her constitutional rights, say right to travel or free speech. Can the defendant raise an argument in his or her defense, move to dismiss, or appeal the decision under these constitutional grounds? Can he open a new case as a plaintiff against the state for enforcing unconstitutional laws?</p>

<p>Yes, certainly.  A prominent example was <a href="https://en.wikipedia.org/wiki/Lawrence_v._Texas" rel="noreferrer"><em>Lawrence v. Texas</em></a>.  The defendants were charged in state court with "deviate sexual intercourse".  They moved to dismiss on the grounds that the statute was unconstitutional.  Their motion was denied and they were convicted and fined; the denial was upheld by the state's court of appeals.  They then appealed to the US Supreme Court, which eventually ruled that the statute was indeed unconstitutional.</p>

<p>A defendant likely wouldn't have standing to sue the state for enforcing the law <em>in general</em>, only for enforcing it on the defendant himself.  </p>

<p>The defendant can challenge the constitutionality of the statute as part of a defense at trial or on appeal.  As Justice Ginsburg recently explained:</p>

<blockquote>
  <p>Bond, like any other defendant, has a personal right not to be
  convicted under a constitutionally invalid law. . . .</p>
  
  <p>In this case, Bond argues that the statute under which she was
  charged, 18 U.S.C. § 229, exceeds Congress' enumerated powers and
  violates the Tenth Amendment. Other defendants might assert that a law
  exceeds Congress' power because it violates the Ex Post Facto Clause,
  or the Establishment Clause, or the Due Process Clause. Whatever the
  claim, success on the merits would require reversal of the conviction.
  “An offence created by [an unconstitutional law],” the Court has held,
  “is not a crime.” <em>Ex parte Siebold</em>, 100 U.S. 371, 376
  (1880). “A conviction under [such a law] is not merely erroneous, but
  is illegal and void, and cannot be a legal cause of imprisonment.”
  <em>Id.</em>, at 376-377. If a law is invalid as applied to the
  criminal defendant's conduct, the defendant is entitled to go free.</p>
  
  <p>For this reason, a court has no “prudential” license to decline to
  consider whether the statute under which the defendant has been
  charged lacks constitutional application to her conduct. And that is
  so even where the constitutional provision that would render the
  conviction void is directed at protecting a party not before the
  Court. Our decisions concerning criminal laws infected with
  discrimination are illustrative. The Court must entertain the
  objection--and reverse the conviction--even if the right to equal
  treatment resides in someone other than the defendant. <em>See Eisenstadt
  v. Baird</em>, 405 U.S. 438, 452-455
  (1972) (reversing conviction for distributing contraceptives because
  the law banning distribution violated the recipient's right
  to equal protection); <em>cf. Craig v. Boren</em>, 429 U.S. 190, 192 (1976) (law penalizing sale of beer to
  males but not females aged 18 to 20 could not be enforced against
  vendor). <em>See also Grayned v. City of Rockford</em>, 408 U.S. 104, 107, n.2
  (1972); <em>Welsh v. United
  States</em>, 398 U.S. 333, 361-362 (1970)
  (Harlan, J., concurring in result) (reversal required even if, going
  forward, Congress would cure the unequal treatment by extending rather
  than invalidating the criminal proscription).</p>
  
  <p>In short, a law “beyond the power of Congress,” for any reason, is “no
  law at all.” <em>Nigro v. United States</em>, 276 U.S. 332, 341 (1928).  The validity of Bond's conviction depends upon
  whether the Constitution permits Congress to enact § 229. Her claim
  that it does not must be considered and decided on the merits.</p>
</blockquote>

<p><em><a href="https://supreme.justia.com/cases/federal/us/564/09-1227/concurrence.html" rel="noreferrer">Bond v. United States</em>, 564 U.S. 211, 226-28 (2011) (Ginsburg, J., concurring).</a></p>

<h2>Yes</h2>
<p>Yes the defendant can challenge the constitutionality of the law under which s/he is charged, or of the procedures that have been used at the trial court level. Indeed failing to raise such an issue will normally be taken as waiving the constitutional issue, so that it cannot be first raised in an appellate proceeding.</p>
<p>One example is the famous case of <a href="https://supreme.justia.com/cases/federal/us/372/335/" rel="nofollow noreferrer"><em>Gideon v. Wainwright</em>, 372 U.S. 335 (1963)</a>. In the Supreme Court opinion, it is stated that:</p>
<blockquote>
<p>Petitioner was charged in a Florida state court with having broken and entered a poolroom with intent to commit a misdemeanor. This offense is a felony under Florida law.</p>
<p>Appearing in court without funds and without a lawyer, petitioner asked the court to appoint counsel for him, whereupon the following colloquy took place:</p>
</blockquote>
<blockquote>
<blockquote>
<p><strong>The COURT</strong>: Mr. Gideon, I am sorry, but I cannot appoint Counsel to represent you in this case. Under the laws of the State of Florida, the only time the Court can appoint Counsel to represent a Defendant is when that person is charged with a capital offense. I am sorry, but I will have to deny your request to appoint Counsel to defend you in this case.</p>
</blockquote>
<blockquote>
<p><strong>The DEFENDANT</strong>: The United States Supreme Court says I am entitled to be represented by Counsel.</p>
</blockquote>
</blockquote>
<p>Another example would be the case of <a href="https://supreme.justia.com/cases/federal/us/367/643/" rel="nofollow noreferrer"><em>Mapp v. Ohio</em>, 367 U.S. 643 (1961)</a> where the supreme court opinion, after discussing in detail the circumstances of the officers breaking into Mapp's dwelling, their search and her arrest, went on to say:</p>
<blockquote>
<p>At the trial, no search warrant was produced by the prosecution, nor was the failure to produce one explained or accounted for. At best, &quot;There is, in the record, considerable doubt as to whether there ever was any warrant for the search of defendant's home.&quot; 170 Ohio St. at 430, 166 N.E.2d at 389.</p>
</blockquote>
<p>If one looks in detail into any case where the appellate courts, particularly the US Supreme Court, passed on the constitutionality of a law, one will normally find that an allegation of unconstitutionality was made at the trial level. This is not always mentioned in the court opinions, which generally devote little space to the proceedings of the trial court, except where these are themselves constitutionally significant. There will usually be a statement of the facts of the case, but this often stops before the trial.</p>
<p>Another example, not strictly speakign a criminal case, but one where people were directly threatened with criminal proceedings, and others had already suffered criminal convictions, was <a href="https://supreme.justia.com/cases/federal/us/319/624/" rel="nofollow noreferrer"><em>West Virginia State Bd. of Educ. v. Barnette</em>, 319 U.S. 624 (1943)</a>. In that case the Supreme Court's opinion said:</p>
<blockquote>
<p>Failure to conform [ to the flag salute requirement] is &quot;insubordination,&quot; dealt with by expulsion. Readmission is denied by statute until compliance. Meanwhile, the expelled child is &quot;unlawfully absent,&quot; [Footnote 5] and may be proceeded against as a delinquent. [Footnote 6] His parents or guardians are liable to prosecution, [Footnote 7] and, if convicted, are subject to fine not exceeding $50 and Jail term not exceeding thirty days. [Footnote 8]</p>
</blockquote>
<p>This establishes potential criminal liability of the parents.  The decision went on to say:</p>
<blockquote>
<p>Appellees, citizens of the United States and of West Virginia, brought suit in the United States District Court for themselves and others similarly situated asking its injunction to restrain enforcement of these laws and regulations against Jehovah's Witnesses. The Witnesses are an unincorporated body teaching that the obligation imposed by law of God is superior to that of laws enacted by temporal government. Their religious beliefs include a literal version of Exodus, Chapter 20, verses 4 and 5, which says:</p>
<blockquote>
<p>Thou shalt not make unto thee any graven image, or any likeness of anything that is in heaven above, or that is in the earth beneath, or that is in the water under the earth; thou shalt not bow down thyself to them nor serve them.</p>
</blockquote>
<p>They consider that the flag is an &quot;image&quot; within this command. For this reason, they refuse to salute it.</p>
<p>Children of this faith have been expelled from school and are threatened with exclusion for no other cause. Officials threaten to send them to reformatories maintained for criminally inclined juveniles. Parents of such children have been prosecuted, and are threatened with prosecutions for causing delinquency.</p>
<p>The Board of Education moved to dismiss the complaint, setting forth these facts and alleging that the law and regulations are an unconstitutional denial of religious freedom, and of freedom of speech, and are invalid under the &quot;due process&quot; and &quot;equal protection&quot; clauses of the Fourteenth Amendment to the Federal Constitution. The cause was submitted on the pleadings to a District Court of three judges. It restrained enforcement as to the plaintiffs and those of that class. The Board of Education brought the case here by direct appeal. [Footnote 9]</p>
</blockquote>
<p>In short the constitutional issue was raised and decided at the level of the Federal District Court, a trial court, before the case was appealed to the Supreme Court.</p>

united-states criminal-law constitutional-law