I will get a master's degree early next year. I would like to do a PhD somewhere else than at my current university. However, since I have already a more impressive publication record than many of the second or third year PhD students at my department, my supervisors are expecting me to stay. I need their reference letters to leave, so what I should do? I think they will be extremely unhappy when I tell them I will be leaving, since they have invested a lot of time to work with me (which has resulted in the said publications).
Trying to hold you hostage by withholding a letter of reference is highly unethical. If they would do that to you, you're probably better off leaving without a letter from them than staying. Otherwise they may be willing to take advantage of you in other ways if you stay for your PhD. Besides, would you ever really be able to trust each other after such behavior?
In the end, they may be disappointed, but if they've gotten several good articles with you during your master's, you've held up your end of the implicit deal in getting a master's degree. Lots of folks (in some countries and some fields) move between master's and PhD. This is normal. They will probably be willing to write you a good letter after they have some time to reflect.
It is very common to change institutions for the Ph.D. Actually, it is very good for your career to meet different researchers and to see how things works in other research teams and another institution. Besides, it is your choice, and your career. You need to take the best choices for your career.
Just let your supervisor know that you want to change your plan for the Ph.D. You may tell them that you want to learn how things works in another research team and go to another city or abroad. And you may tell that in the future you may still collaborate with them, if you wish. But in the end, they should support you. If they don't want to write a recommendation letter, they are very bad supervisors. A good supervisor should support you in your career decision.
I feel I should answer rather than comment on the previous two answers. The reality is that some may very well think it's unethical to withhold letters of references but unfortunately some do not see it this way.
It seems clear the OP has made up his/her mind to go elsewhere so he/she should make selected but discreet contacts with potential supervisors before asking for letters of support. If the file is a good as suggested by the OP, suitable Ph.D. supervisors can out their weights behind an admission file and lessen the impact of letters from irritated referees, especially if some sort of dialogue or web-based interview show the student is serious and level-headed.
One should not forget that it is often acceptable to arrange for more than the minimum numbers of letters of support, thereby diluting the impact of an unethical referee.
Ultimately, unless the number of positions is limited, good candidates are seldom turned down if they can demonstrate prior research excellence and the initiative to work around the kind of problems alludes to in by the OP.