Despite having a green card (U.S. lawful permanent residency), you can become deportable and lose that status for a number of reasons, many of them having to do with drug use or sales. U.S. immigration laws contain a long list of grounds of deportability, which affect green card holders as well as other aliens, at Section 237 of the Immigration and Nationality Act (I.N.A.).
There are various ways that U.S. immigration authorities might discover that you've seemingly become deportable for drug-related reasons. Most likely it would be because of contact between them and U.S. law enforcement authorities, if you've been arrested, or because the information comes out in your application for further immigration benefits.
If such a thing occurs, you would likely be placed into removal proceedings before an immigration judge. If unable to prove that your drug crime or drug-related activities did not amount to a ground of deportability, you would likely be ordered removed from the U.S., and your visa or green card cancelled. An order of deportation makes you ineligible to return to the U.S. for a number of years.
Here's a brief summary of the specific drug offenses that can make a person deportable:
As you see, these can encompass a wide variety of behavior, not all of which even necessarily led to a criminal conviction.
Crimes involving possession of controlled substances and drug trafficking do not come with any possible waiver for the offending individual. (A waiver is a request to the USCIS to overlook the offense and allow you to keep your visa or green card anyway.)
If you or a member of your family is a non-citizen and has been charged with any sort of crime involving drugs or controlled substances, it is in your best interests to consult both a criminal defense lawyer and an immigration lawyer. The immigration attorney can provide guidance that may serve to preserve your status as a visa or green card holder, and represent you in immigration court proceedings.