What are my chances of being accepted in a Ph.D. program with poor M.Sc. grades? I'm currently studying for a computer science Masters degree in a top UK university and I wish to pursue a career in academia by getting a Ph.D. degree. I got perfect coursework grades, however, I didn't do well in my exams which count for 90% of the total grade in every course. Unfortunately, I'm 90% confirmed that I'll fail one of the courses and even if I resit it I'll only graduate with an overall pass due to the department's regulations related to failed courses. My current thesis supervisor, who also supervised my research course last semester, is very pleased with my work and offered me a Ph.D. position in a newly funded project. However the department's regulations admit only distinction holders, especially students graduating from the same department. 

Is there any chance of me being admitted or is it impossible for a "pass" Master holder to continue their studies?
You need to talk with your thesis supervisor to find out whether the department's regulations are "hard" or "soft."  Many departments have clear regulations which are "soft" in the sense that they can have small exceptions made if a professor can make a case for why such an exception should be made.  This is very often the case, and if this is the case for your department and your supervisor wants you as a Ph.D. student, then you are fine.

Sometimes, however, a department will not allow such leniency for its professors.  If this is the case, and your supervisor wants you as a Ph.D. student, then they should also be able to advise you on what to do to try to get yourself into compliance with the regulations.