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. The 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.).
How would the immigration authorities discover that you've seemingly become deportable for drug-related reasons? Most likely because of contact between them and law enforcement authorities, if you've been arrested, or because the information comes out in your application for further immigration benefits. If this 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 may make a person deportable:
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.