How to tell my advisor I am leaving the PhD program, when he is the reason I'm leaving? I want to give up my current PhD program, which I started 5 months ago, because I really do not like my current advisor's personality and working style. He lives a relaxed life and has no enthusiasm for science after getting tenure.  He does not  have funding and never releases decent papers because he does not work hard. 

But I like my current direction. So I want to give up my PhD and switch to the master's program - as I have nearly finished all the coursework, and I do not want a gap in my CV - and then apply to a new school, as there is no other professor in my school doing work in my direction. 

My question is: how can I tell him that I want to leave the PhD program? I do not want to tell him the true reason, because I want him to write a recommendation for me, and I think he likes me.
Tell him why you're even more excited about the places to which you're applying.

At University X, Dr. Y is doing groundbreaking work in Z, and has published three papers in Prestigious Journal With A Latin Title in the last two years alone. Her students are also proving amazing results and speaking all over the world about them, and one of them just got a job at Top-Class University W. Every week they have a seminar where they discuss blah-blah-blah... [etc., etc.]
I'm grateful for all the opportunities you've afforded me here, and I think that X,Y, and Z would be an even better fit for me.