In a unanimous 8-0 decision the court overturned the ruling based on the prosecution's improper interpretation of the federal bribery statute.
A federal judge sentenced McDonnell, 61, to two years in prison in January 2015 after a jury found him and his wife guilty of 11 counts of corruption. During arguments on April 27, some of the justices appeared to support the Republican's assertion that his actions didn't rise to the level of a crime.
And that was affirmed in the opinion Monday.
"There is no doubt that this case is distasteful; it may be worse than that. But our concern is not with tawdry tales of Ferraris, Rolexes, and ball gowns," Chief Justice John Roberts wrote. "It is instead with the broader legal implications of the government's boundless interpretation of the federal bribery statute. A more limited interpretation of the term 'official act' leaves ample room for prosecuting corruption, while comporting with the text of the statute and the precedent of this court."
The case is remanded to the Fourth Circuit Court of Appeals "for further proceedings consistent with this opinion."
The appeals court last July had affirmed the lower court's verdict.
The Supreme Court allowed McDonnell to stay out of prison while the court considered whether to hear his case.
During arguments, McDonnell's attorney, Washington lawyer Noel Francisco, said McDonnell's favors for businessman Jonnie R. Williams Sr. weren't "official acts" that can be considered bribery. McDonnell admits that he accepted more than $170,000 in gifts, loans and vacations, but says he didn't violate federal law because his actions were routine courtesies.
But Deputy Solicitor General Michael Dreeben, representing the government, argued that overturning the verdict "would send a terrible message to citizens."
McDonnell was governor from 2010-14.