Hydraulic fracturing has paved the way for the extraction of substantial quantities of shale gas. Traditionally, water (in significant quantities) has been used as the primary fracturing fluid. In addition to the significant water usage in fracturing, large quantities of shale gas wastewater have been generated. Driven by the need for better management of water resources in hydraulic fracturing, the introduction of CO 2 (captured from industrial emissions) has been considered an element in the fracturing fluid. This paper proposes a mathematical programming formulation to synthesize the best configuration for the use of water and CO 2 associated with shale gas hydraulic fracturing operations while taking into account the fluctuations in water availability, generation of CO 2 , and the flowback water based on a time horizon. The proposed formulation incorporates a strategic planning that minimizes the total annual cost (TAC) considering water requirements, generation and capture of CO 2 , as well as the capacity of the equipment for treatment technologies, transportation fees, storage units, and disposal. A case study is presented to demonstrate the usefulness of the proposed methodology. The results show that at a higher percentage of CO 2 in the fracturing fluid, the TAC increases but the freshwater required decreases. Furthermore, the trade-offs and impact of freshwater availability have been identified.