Is it legal to prosecute someone for ulterior motives in the US?
<p>Suppose someone does something you don't like but isn't illegal. Can you 
(a prosecutor) prosecute them for something illegal with probable cause not because of their illegal action but because of the legal action you didn't like? Does this fall under abuse of process? Is it against the due process doctrine as the defendant isn't actually being punished for what they're being punished for on paper? Is it at least against a prosecutorial code of conduct? If so, how seriously are such codes of conduct taken?</p>

<p>Example: Suppose someone cheated on their wife, can they be prosecuted for the possession of marijuana if the reason that the prosecutor is prosecuting them is the cheating?</p>

<p>Here's some of the law in the area of prosecutorial discretion:</p>

<blockquote>
  <p>In the ordinary case, “so long as the prosecutor has probable cause to
  believe that the accused committed an offense defined by statute, the
  decision whether or not to prosecute, and what charge to file or bring
  before a grand jury, generally rests entirely in his discretion.”
  <em>Bordenkircher v. Hayes</em>, 434 U.S. 357, 364, 98 S. Ct. 663, 668, 54 L.Ed.2d 604 (1978).</p>
  
  <p>Of course, a prosecutor's discretion is “subject to constitutional
  constraints.” <em>United States v. Batchelder</em>, 442 U.S. 114, 125, 99 S.
  Ct. 2198, 2204–2205, 60 L.Ed.2d 755 (1979). One of these constraints,
  imposed by the equal protection component of the Due Process Clause of
  the Fifth Amendment, <em>Bolling v. Sharpe</em>, 347 U.S. 497, 500, 74 S. Ct.
  693, 694–695, 98 L.Ed. 884 (1954), is that the decision whether to
  prosecute may not be based on “an unjustifiable standard such as race,
  religion, or other arbitrary classification,” <em>Oyler v. Boles</em>, 368
  U.S. 448, 456, 82 S. Ct. 501, 506, 7 L.Ed.2d 446 (1962). A defendant
  may demonstrate that the administration of a criminal law is “directed
  so exclusively against a particular class of persons ... with a mind
  so unequal and oppressive” that the system of prosecution amounts
  to “a practical denial” of equal protection of the law. <em>Yick Wo v.
  Hopkins</em>, 118 U.S. 356, 373, 6 S. Ct. 1064, 1073, 30 L.Ed. 220 (1886).</p>
  
  <p>In order to dispel the presumption that a prosecutor has not violated
  equal protection, a criminal defendant must present “clear evidence to
  the contrary.” <em>Chemical Foundation</em>, supra, at 14–15, 47 S. Ct., at
  6. We explained in <em>Wayte</em> why courts are “properly hesitant to examine the decision whether to prosecute.” 470 U.S., at 608, 105 S.
  Ct., at 1531. Judicial deference to the decisions of these executive
  officers rests in part on an assessment of the relative competence of
  prosecutors and courts. “Such factors as the strength of the case, the
  prosecution's general deterrence value, the Government's enforcement
  priorities, and the case's relationship to the Government's overall
  enforcement plan are not readily susceptible to the kind of analysis
  the courts are competent to undertake.” <em>Id.</em>, at 607, 105 S. Ct., at
  1530. It also stems from a concern not to unnecessarily impair the performance of a core executive constitutional function. “Examining
  the basis of a prosecution delays the criminal proceeding, threatens
  to chill law enforcement by subjecting the prosecutor's motives and
  decisionmaking to outside inquiry, and may undermine prosecutorial
  effectiveness by revealing the Government's enforcement policy.”
  <em>Ibid.</em></p>
</blockquote>

<p><em><a href="https://supreme.justia.com/cases/federal/us/517/456/" rel="nofollow noreferrer">United States v. Armstrong</a></em>, 517 U.S. 456, 464–65 (1996).</p>

<p>If they did something illegal, a <strong><em>prosecutor</em></strong> acting for the state (not just any regular person), can prosecute them.  </p>

<p>The Prosecutor's motive or reason for choosing to pursue the case or not, to be aggressive or lenient, should not be taken into account by a Judge.</p>

<p>In your example:<br>
If you don't want to get prosecuted for marijuana, don't use/possess marijuana!
It doesn't matter if you slept with the prosecutor's wife:  You still had an illegal substance. </p>

<hr>

<p>You wrote:</p>

<blockquote>
  <p>Can you prosecute them for something illegal with probable cause not because of their illegal action but because of the legal action you didn't like?</p>
</blockquote>

<p>No:  <strong><em>You</em></strong> cannot prosecute someone (unless you happen to be a prosecutor, and are working in your official capacity).   You can ask the police to investigate (and they will prioritize appropriately).  You can cooperate with the prosecutor if you are materially involved.  But the prosecution is up to the state, not to <em>you</em>.</p>

<p>So in this case, the Prosecutor is right to file charges against the offender for the crime, however, if the Prosecutor is aware of the defendant having slept with his wife prior the trial and does not recuse himself, it could affect the outcome of any appellant court case and the trial decision maybe vacated Or a mistrial declared.</p>

<p>Recuseal does not mean the defendant does not get prosecuted, only that the prosecutor's office (including those career lawyers who work in the office) are not going to handle the case and instead turn it over to another prosecutor's office to argue the case.</p>

united-states criminal-law