Quitting a PhD program after four years and applying elsewhere I am a fourth year graduate student at a tier 1 research university in the US. I had lot of hiccups in getting started with my research. Our program is rotation bases where you rotate with your potential PIs for a semester (or more). I decided to rotate with Prof. A and continued it for another semester. However, in the summer of the year I was transitioning into my second year, I went to Prof. B to do my last rotation. Prof. B had a more concrete project that I worked on and I was super productive under him so I decided to join Prof. B's lab permanently. However, Prof. A was not happy about this since I had done two rotations with him.

In my third semester Prof. B decided to leave academia and moved to industry. I was given an option of quitting with a Masters or joining another PI. I chose to find a new PI. My research focus was in a particular area that only Prof. A and Prof. B studied. Our department is anyway too small with only 6 faculty who work on completely different areas. So, after being without a PI for almost a semester I decided to approach Prof. A to see if I could join his lab. He was not convinced initially. I had to provide detailed account of things I had worked on with Prof. B. In one of such early meetings, he told me "I don't have to do this. sufficient number of students have graduated from my lab and I have a tenure now.". But eventually, he decided to let me in his lab. Since we both didn't have a concrete project in mind, he suggested I write a review article on the project I had previously been working on. That did not go well. I wasted a semester studying that area in depth, but went in a tangential direction and couldn't finish the review. However, a new project came up through a collaborator and I was assigned to finish it. However, there were very limited questions that could be answered and my progress left him dissatisfied. I was told I could do 'cool things' with the data, without ever being told what these 'cool' things could be given the limited nature of data. In this process, I got another project to work on which I saw as being my main contribution to my field. However my PI has always found my methods to be 'too complicated'. 

In this entire process, my realtions with my PI has always been deteriorating. I have been told "I am smarter than you", "I am not interested in your sloppy work", "Don't waste my time with your bullshit". My requests to talk about our method have lately been ignored. 

I wanted to work in academia and I want to finish my PhD. However when I think about the relation I share with my PI has forced me to wonder if I even finish my PhD, his letter of recommendation will be a negative one, probably killing my career anyway. My post sounds toxic, but so has been my relation to my PI. I had to seek professional counselling a year back. With the relation we share currently, I don't let it affect my work. However, I am also not at peace with it in my mind.

Hence, I am considering quitting and applying elsewhere. However, I will need letters of recommendation from him to do that. How do I present my case? I have a decent GPA in undergrad/grad schools. In these four years, I was also able to enrol for a Masters in a related field in the same school.
Consult Professor B; he thinks highly of you, and can suggest someone for you to work with, who is not professor A. This may entail moving elsewhere.