It's unlikely that you would be able to fire your real estate agent right before closing. The specifics of your situation will depend on your buyer-broker agreement and state law governing real estate contracts. Consult a real estate lawyer for more information.