Compressed natural gas (CNG) has gained popularity due to its wide availability, higher efficiency, and lower emissions compared to gasoline. However, the lower flame speed characteristics of CNG with conventional port injection reduce the CNG engine volumetric efficiency and power output. CNG's lower gas jet momentum during a low load operation creates a non-uniform air-fuel mixture that affects ignition and combustion quality. Direct injection of CNG with optimum injection timing is expected to improve volumetric efficiency, ignition quality, and combustion process. In this study, a comparative study on the effect of end-of-injection (EOI) timing on volumetric efficiency, thermal efficiency, combustion duration, and emissions was carried out in a single-cylinder port fuel injection (PFI) spark-ignition engine using gasoline and CNG, and direct injection (DI) spark ignition engine using CNG. The experiments were performed at two-part load operations of 20% and 40% throttle at 900 and 1500 rpm. Experimental results indicate that the PFI CNG engine is more influential in EOI timing than gasoline engines. The performance of the PFI CNG engine is improved when the injection occurs during the intake valve open period compared to the closed valve period with higher thermal efficiency, volumetric efficiency, and indicated mean effective power (IMEP). A shorter flame development angle and combustion duration were observed when EOI timing was in the open intake valve condition. DI CNG improved volumetric efficiency at advanced EOI timing compared to the PFI CNG engine. However, the combustion process is critically dependent on injection timing and air-fuel mixing duration. A three-dimensional computational fluid dynamics simulation was conducted to evaluate the effect of advanced and retarded EOI timing on DI CNG engine's in-cylinder turbulent kinetic energy development and in-cylinder equivalence ratio near the ignition point. An excess advanced EOI timing resulted in stratified rich and retarded EOI timing results in loss of turbulence energy, leading to a slightly rich and lean mixture for advanced and retarded EOI timing, respectively. Hence, an optimum EOI timing provides a conducive environment to initiate the combustion and flame front propagation. Further, advanced EOI timing was required at higher throttle opening and engine speed. The emissions in DI CNG were also greatly affected by EOI timing.