Reflecting bad experience with previous graduate program in statement of purpose I am applying to master program in computer engineering, but I have some concerns and not sure how to present them in my statement of purpose.

First, my undergrad was in computer engineering but after moving to US I pursued biology in graduate school. I had bad experience with my adviser. He moved to another university right when I started my research, but since I had a fellowship that came from a school in our university, I was forced to stay. He promised to help me, but didn't do anything after he moved. That being said, since I just started my research and we had a small department in which no one else worked on the same area, I couldn't make progress on my own. 

But, then I started taking some online courses and became really interested in some new areas and also coauthored a paper in computer architecture. Now I want to apply to computer engineering for masters. 

I also had to extend my graduate program in Biology due to some immigration related stuff, so now my graduate degree took more than five years, while I don't have any result in it. I was wondering how can I represent these stuff in my statement of purpose without hurting my chance of getting admission. I should also mention that I took almost all the PhD courses in Biology and have a very good GPA in graduate school.
It's tough to explain this, but here are a couple of things to note:


Explain the situation without being disrespectful to your adviser. If it were me I would not even blame him for anything, I would just make sure my writing leads the reader to that conclusion without me explicitly stating it.
I don't think that your immigration status issue would sit well with the committee as a reason for you staying in the program for five years. If you had the intention of finishing your degree despite your new-found interest you should mention it.
I'm getting the understanding that you will not be receiving any degree for your efforts over five years. I'm guessing that the school does not award M.S. degrees to PhD students who have not been able to conclude their research. However, if this is not the case, I highly recommend you try to get a master's degree. You mentioned that you completed most of the PhD coursework. You may be able to get a course-based master's degree even if your research has not progressed enough for a master's thesis. An SOP stating that you had difficulty with your research and ended up getting a course-based degree reads a lot better, especially since you seem to have a valid excuse for it.
Completing your PhD would disqualify you for being admitted to EE PhD programs at many universities (many schools do not award PhD's to people who already have one). I would assume if getting a PhD (in your new area of interest) became your goal at some point during these five years, this would be a good reason for you not to complete your current PhD, so you may want to mention this to justify not completing your degree. Again, if you are able to get a course-based degree, this will sound a lot more convincing.
Don't lie in your letter. Not that I'm implying that you meant to do this; however, it is usually pretty easy to detect an untruthful SOP.


Good Luck!