Still, Mr. Greitens, only a year and a half into his first term in office, remains entangled in a legal and political thicket, and his future remains very much in doubt. A second felony charge, of tampering with computer data, awaits; prosecutors contend that he illegally obtained a donor list from a veterans’ charity he founded and used it for his 2016 campaign. And he faces a looming threat to his governorship from the Missouri General Assembly, which has scheduled a special session on Friday that could lead to a vote on impeachment.

In dropping the invasion-of-privacy charge, prosecutors cited the defense team’s decision to call the St. Louis circuit attorney, Kimberly Gardner, as a witness in the case. The lawyers for Mr. Greitens had accused Ms. Gardner of condoning misconduct and lying by an investigator on the case, and apparently intended to question her on those issues.

“When the court and the defense team put the state in the impossible position of choosing between her professional obligations and the pursuit of justice, the circuit attorney will always choose the pursuit of justice,” said Susan C. Ryan, a spokeswoman for the prosecutor, in a statement explaining the decision to drop the charge. “The court’s order leaves the circuit attorney no adequate means of proceeding with this trial.”

But the case had other troubles from the start.

Ms. Gardner, a Democrat, filed the felony charge in February, accusing Mr. Greitens, who is married, of taking the explicit photo of his former hairdresser, with whom he has acknowledged having an affair. The woman, who has not been identified, was captured on a secretly recorded tape telling her then-husband that Mr. Greitens had blindfolded her, torn off her shirt and pants and taken a photo without her consent. Her ex-husband released the audio recording of the conversation to the news media over her objections.

Months after bringing the charge against Mr. Greitens, prosecutors still had not obtained such a photo, despite searches of the governor’s cellphone and electronic cloud accounts. The woman at the center of the case was a reluctant witness as well, declining all media interviews and pleading for privacy.