Original: The Dean and Chapter dismissed him for being drunk at the organ and using bad language during divine service.
Simplified: In the end he lost his job because he was drunk at the organ and used bad language during the service.