The document describes an on-site, cost-effective wastewater treatment package for the shale oil and gas industry using an integrated process of chemical coagulation, walnut shell filtration, and membrane distillation. The treatment package is energy self-sustaining through the use of geothermal energy and produces high quality water that can be discharged or reused while meeting EPA regulations. It provides a competitive alternative to current evaporation-based and reverse osmosis technologies that are expensive, energy intensive, or unable to treat high-salinity wastewater. Preliminary lab results show the treatment train can operate continuously for over 70 hours with over 99.9% removal of salts, organics, and boron.