"Today is a historic day for liberties," court president Arturo Zaldivar said, after eight of the 11 judges backed the decision declaring the drug's prohibition under the health law to be unconstitutional.
The ruling comes after Congress failed to enact legislation allowing recreational marijuana use by an April 30 deadline set by the country's highest court.
The landmark bill was approved by the lower house in March but still needs final approval by the upper house, the Senate.
In April, the ruling majority in the Senate said it was considering postponing the final discussion on the law until September.
The Supreme Court urged Congress to issue the necessary legislation "in order to generate legal certainty."
- Legal obstacles -
Pro-legalization campaigners said the Supreme Court ruling left cannabis users facing many uncertainties.