"We dismiss the Attorney General's appeal," the court's President David Neuberger said in his ruling.
The Supreme Court does not have the letters and they will not be immediately released. Government departments are in possession of the letters and it was not immediately clear how disclosure would be handled following the Supreme Court ruling.
"This is a matter for the government," said a spokeswoman for Prince Charles at Clarence House, his official London residence. "Clarence House is disappointed the principle of privacy has not been upheld."
There was no immediate comment from the Attorney General's office.
Under Britain's unwritten constitution, the royal family should remain politically neutral. Queen Elizabeth has steadfastly kept her opinions to herself during her 63-year reign.
Charles, in contrast, has expressed views about subjects close to his heart such as nature conservation, architecture and genetically modified crops.
His letters to ministers, nicknamed "black spider memos" because of his scrawled handwriting, are potentially controversial if they create the perception that he disagreed with the government and attempted to influence policies.
Grieve had argued that such a perception "would be seriously damaging to his role as future monarch because, if he forfeits his position of political neutrality as heir to the throne, he cannot easily recover it when he is king".
Follow us on Twitter: @CNBCWorld