The auto-ignition and combustion mechanisms of dimethyl ether (DME) in a fourstroke homogeneous charge compression ignition (HCCI) engine were investigated using a zero-dimensional thermodynamic model coupled with a detailed chemical kinetics model. The results indicate that DME displays two-stage auto-ignition, and heat release with a low-temperature reaction and a high-temperature reaction (HTR). Heat release with the HTR can be separated into two stages: blue flame and hot flame. HCCI ignition is controlled by hydrogen peroxide (H2O2) decomposition, and OH plays a very important role in HCCI combustion. Formaldehyde (CH2O) is the main source of H2O2. Based on the sensitivity analysis of chemical reactions, the major paths of the DME reaction occurring in the engine cylinder are clarified. The major paths of the DME reaction is H-atom abstraction from DME, followed by the first addition of O2 and second addition of O2, and then oxidation to formaldehyde (CH2O), the formyl radical (HCO), and finally carbon monoxide (CO). CO oxidation occurs at the hot flame by the elementary reaction CO + OH = CO2 + H. At leaner DME concentrations, CO cannot be completely converted to carbon dioxide (CO2), and the process will result in high CO emissions.