Asphaltene deposition in porous media creates many challenges in porous media. This study synthesizes ZnO/SiO2/xanthan nanocomposites (NCs) to adsorb asphaltene and reduce its effect on the shale and carbonate rocks. NCs structure is analyzed using SEM, EDX, BET, and FTIR tests. Also, the rocks' surface is analyzed by an atomic force microscopy (AFM) test after 48 and 96 h of contact with 20 ppm NCs and 20 mg asphaltene. Core flooding tests are performed on shale rocks using 20 ppm NCs at 5500, 4000, and 2500 psi at 48 h. Using AFM in calcite and dolomite formations and selecting core flooding tests based on that are new scenarios that followed in this paper. FTIR results confirm asphaltene adsorption on NCs's surface by changing 854 and 962 cm−1 peaks. AFM tests confirmed asphaltene adsorption on NCs surface, too. Average roughness, root mean square roughness, peak to valley roughness, and average size of the shale were higher than the carbonate sheets. At 20 ppm NCs in shale reservoirs, permeability reduction in porous media was increased up to 39.5 %, and asphaltene precipitation decreased from 8.95 and 20.06 wt% to 2.25 and 10.25 wt%, which shows our suggested scenarios were efficient.