Generally, when purchase documents are signed by seller and buyer they become legally binding, i.e., an enforceable contract to purchase a home. I suggest you confer with an experienced attorney as to your legal rights and your aims and goals. There is case law regarding the matter of 'earnest money' which may apply to the issue you stated. Tricia Dwyer Esq.
MINNEAPOLIS/ST. PAUL - ST CLOUD. This law firm may accept avvo posters as clients but this post is not legal advice and does not create an attorney-client relationship. This post is to be considered general information which may or may not apply to your personal situation. Please do seek private attorney counsel as to your personal legal issues and needs.
You'll want to check the time frame Minnesota imposes on earnest money deposits (e.g. here in Utah, the earnest money must be deposited into escrow or in a trust account within 3 days of the offer's acceptance).
However, if you are wanting to withdraw from the deal, the earnest money is a moot point if you withdraw before the earnest money deposit deadline. If you have a contingency in your purchase agreement that allows you to back out of the transaction you may withdraw from the contract under that provision. Are you working with a Realtor? If so, your agent would be able to help you withdraw; if not, you can consult with a local real estate attorney and they will help you find a way to cancel the agreement.
The answer to your question is not intended as legal advice or counsel. Because of the minimal facts involved in question and answer formats, the answer given serves as only that. No representation is created by the answer and comments given to an individual question. And you are advised to seek legal counsel in your specific area for a more detailed analysis and guidance on your particular situation.