I lost a job in an industry I was in for 10 years because of one particularly hungover morning. My boss saw that something was off about me and asked repeatedly "what are you on?" I was in rough shape: balance was off, difficulty focusing and speaking. My dad came to get me at work that day and I never returned (note that I was in my 30's when this happened - horribly embarrassing to have to call your dad to rescue you).
Recently, I very nearly lost the job I have now because I was drinking at work and was getting worse and worse with it. I finally had to come clean to my boss and tell her that I have a problem with alcohol, even though I knew it could end badly. The good news is that I'm still employed and making her aware has helped me stay sober - I know that if I relapse and begin drinking at work again, she'll know it immediately. There's no more hiding.