The Americans with Disabilities Act makes it illegal to fire someone for seeking treatment for an addiction, for going to rehab, and for completing rehab and being in recovery. So yes, it is illegal to fire someone for going on medical leave to recover from an addiction which has interfered with their job.