Prosecutors in Mexico say they have dropped the charges against retired general Tomas Angeles Dauahare.
Gen Angeles, a former deputy defence minister, had been accused of having links with a drug cartel.
Prosecutors said they could not corroborate allegations made by two witnesses against the general.
Shortly after the announcement, Gen Angeles was released from the maximum-security jail where he had been awaiting trial.
He had been facing charges of “organised crime to further drug-trafficking”, which he had denied all along.
Two people in a witness protection programme, known under the code names of Jennifer and Mateo, had accused him of links with the Beltran Leyva cartel.
‘False testimony’
They said Gen Angeles was tipping off cartel members about police and army operations against them in exchange for money,
Prosecutors said that they had found no convincing evidence “corroborating the testimony of the protected witnesses and no proof whatsoever which would confirm the allegations made by Jennifer and Mateo”.
Jennifer was the same witness who had also accused the former anti-drugs tsar Noe Ramirez Mandujano of links with the Beltran Leyva cartel.
Mr Ramirez was cleared of the charges on Monday and released earlier on Wednesday after more than four years in prison.
The judge in that case asked for Jennifer to be investigated on suspicion of giving false testimony.