Abstract The adsorption mechanisms of formaldehyde (H 2CO) on modified graphene, including aluminum doping, Stone–Wales (SW) defects, and a combination of these two, were investigated via density functional theory (DFT). It was found that the graphene with SW defect is more sensitive than that of perfect graphene for detecting H 2CO molecules. Compared with Al-doped graphene/H 2CO complex, the binding energy for Al-doped SW defect complex can be enhanced by the introduction of a SW defect. The large values of binding energy and net charge transfer for this complex indicate a strong chemisorption and a larger affinity with H 2CO for the modified graphene. Furthermore, the density of states (DOS) of the complex shows that the effect of defect–dopant combination on adsorption mechanisms is due to the orbital hybridization between the Al atom and its adjacent C atoms. In addition, it can be expected that adsorption of H 2CO on the surface of Al-doped SW defect may occur easily, and the Al-doped SW graphene is more suitable for H 2CO gas detection.