Yes, in most cases you can legally be fired for relapsing, even if you previously completed rehab. The Americans with Disabilities Act (ADA) protects people with a history of substance use disorder from discrimination based on that history, but it does not protect someone who is currently using drugs or alcohol illegally or who violates a company's conduct, safety, or drug-free workplace policy. Relapse itself isn't illegal to be fired over; what usually gets someone terminated is the behavior tied to it, such as showing up impaired, failing a drug test, missing work, or breaking a last-chance agreement.
The key legal distinction is "current use" versus "history of addiction." The ADA shields employees who are in recovery, who have successfully completed a treatment program, and who are no longer engaging in illegal drug use. It does not shield someone who is actively using illegal drugs at the time of the adverse action. Alcohol is treated a bit differently since it's legal, but an employer can still discipline or fire an employee for being under the influence at work or for performance and conduct problems connected to drinking, regardless of whether alcoholism is considered a disability.
Many employers use "last-chance agreements" after a first rehab stint or policy violation. These are legally binding contracts stating that any further positive drug test, missed treatment appointment, or conduct violation results in immediate termination. If you signed one of these and then relapsed and violated its terms, the employer generally has strong legal footing to fire you, and the ADA will not override a validly enforced agreement of this kind.
There are a few scenarios where termination after relapse could be challenged. If an employer fires you simply because they learned you have a substance use disorder history, without any current violation or safety issue, that could be disability discrimination. If you requested a reasonable accommodation, such as a modified schedule to attend outpatient counseling or a brief medical leave to reenter treatment, and were fired for making that request rather than for misconduct, that could also raise ADA or FMLA claims. Timing and documentation matter a great deal in these cases.
Job protections under FMLA can cover a return to inpatient or intensive outpatient treatment during a relapse, provided you're eligible (generally having worked enough hours at a company with enough employees) and you request leave appropriately. FMLA leave for treatment doesn't excuse misconduct that happened before the leave was requested, and employers can still discipline based on performance or safety issues documented beforehand.
If you're worried about your job after a relapse, the most protective step is to be proactive: disclose the need for treatment before a crisis forces the issue, request FMLA or accommodation in writing, and avoid working while impaired. If you believe you were fired solely because of your history of addiction rather than current conduct, consult an employment attorney or contact the EEOC, since these cases often turn on specific facts and documentation.