Master's Thesis unexpectedly going south but admitted into PhD program next fall
I don't know the details of your situation, but the conventional advice would probably be:


Pound out a thesis that's good enough for your advisor to let you graduate. It doesn't need to be outstanding or publishable, or include every idea you've considered. It just has to get you the masters.
Start your PhD program on time.
If the project still interests you, continue working on it in your spare time. Stay in contact with your masters advisor. When it's far enough along to publish, do so (perhaps with your masters advisor as a co-author).