More details would be needed to know the reason the seller and or broker is not releasing the earnest money. If you are not in any breach of contract on your part, then I would talk to the listing broker first before filing a lawsuit and try and work something out. Maybe the threat of filing will get you some satisfaction before you need to take it to court.
It sounds like you have chosen to cancel your purchase contract, and the Sellers don't want to do that.
Without knowing the details of your situation, I don't actually know if you are in a position to cancel the contract and receive your earnest money back. What does your agent say? He/she should be able to explain your purchase contract to you.
The contract guides everything. Was there a contingency (or condition) in the contract, such as your obtaining financing, which was not met ,and may now allow you to cancel the contract and get your deposit back?
Please ask your real estate agent what the procedures are for handling an escrow dispute in your state. Your state's Real Estate Commission will have very strict rules about how these disputes are handled, and until the dispute is resolved, the money cannot be released to anyone.
If it's possible, you may find the best solution is to work things out with the Seller and proceed to closing. Good luck.
Maggie Hawk, REALTOR
Watson Realty Corp.