Upholding the October 2006 ruling, the higher court said that "exceptional circumstances" meant an "illegal scheme can be justified when committed out of necessity.
"The state of necessity is established," it added.
The judgement followed a decision by the public prosecutor's office to challenge the appeal court's ruling which allowed MS sufferer Wim Moorlag and his wife Klasiena Hooijers to grow cannabis in order to alleviate his symptoms.
According to the Dutch government, the ruling set a precedent which endangered the country's tolerant policy on cannabis use. The sale and consumption of small quantities of the drug are permitted in licensed coffee shops.
Moorlag and his wife, who had been growing cannabis in order to ensure a private supply, were fined 250 euros (350 dollars) in a 2004 prosecution.
The MS sufferer, who requires three grammes of cannabis per day, earlier told the authorities he was compelled to produce his own cannabis.
Cannabis purchased in coffee shops, he said, could contain fungi and bacteria especially harmful to MS sufferers.
After the 2006 court of appeal ruling Moorlag's lawyer said the judgement meant that other patients such as people with AIDS could also legally grow their own cannabis.
Dutch citizens can legally purchase up to five grammes of cannabis per day and be in possession of up to 30 grammes for their own personal use without being prosecuted. Growing or selling cannabis, however, is illegal.