The pair can use small amounts of the drug but are not authorized to sell it.
This is the first time cocaine use has been made legal in Mexico and the exact reason for the ruling has not been given.
The ruling was announced Tuesday, however it's not in effect yet. It must be reviewed by a higher court.