Heteroatoms are essential for functional groups in organic structures and are complementary to hydrocarbon molecules in reactivities and properties. However, it is still a challenge to quickly identify heteroatoms with only non-contact atomic force microscopy (nc-AFM) to resolve chemical structures in complex unknown mixtures. This study aimed to understand the effect of elemental types on the contrast of atomic force microscopy (AFM) images using a few selected model heterocycles, including dibenzothiophene (DBT), acridine (ACR), and carbazole (CBZ). We identified several features that can be used to find common heteroatoms (S and N) and discriminated them from carbon atoms (C) using nc-AFM images alone. The mechanism of the atom and bond contrast was studied with image simulations and was found to be mostly correlated to van der Waals radii, but other factors, such as bonding geometry, electron density, and substrate interaction, need to be considered. This work will allow for rapid identification of these common heteroatoms in petroleum with AFM.