A natural gas-fueled homogeneous charge compression ignition (HCCI) engine is coupled to an exhaust gas operated turbine driven two-phase ejector cycle to generate power and cooling energy, simultaneously. By establishing a thermodynamic model, the simulation of the proposed system and its parametric analyses are conducted. Energetic and exergetic investigations are carried out to study the role of equivalence ratio, engine speed, condenser temperature, refrigeration evaporator temperature, air-conditioning evaporator temperature, and ejector nozzle efficiency on the thermodynamic performance parameters of the combined cycle. The analysis of two-phase ejector cooling cycle using three working fluids including R717, R290, and R600a is conducted. Results reveal that the thermal efficiency of HCCI engine is increased from 47.44% to 49.94%, and for the R600a operated combined cycle it is increased from 60.05% to 63.26% when the equivalence ratio is promoted from 0.3 to 0.6. Distribution of fuel exergy results show that out of 100% exergy input, in case of R717 operated combined cycle, 139.79 kW (38.72%) is the total exergy output, and 164.21 kW (45.49%) and 57 kW (15.79%) are the values for exergy destruction and exergy losses. It is further shown that change in refrigerant minorly influence the percentages of exergy distribution.