Shale formations have recently gained plenty of attention owing to their large amounts of reserves. Horizontal drilling and hydraulic fracturing are the proposed approaches for the development of shale formations. The extended information of the mechanical properties of shale formation is crucial for designing a successful hydraulic fracturing operation. On the other hand, the mechanical properties of such organic-rich formations are greatly affected by the mechanical characteristics of the present kerogen (organic matter), which dramatically changes during the maturation process. In this study, a Qingshankou shale sample containing kerogen type I is mechanically investigated at different maturity levels using the grid nanoindentation approach. To this end, the original immature sample is artificially matured during hydrous (HP) and anhydrous (AHP) pyrolysis. More than 930 nanoindentation tests were performed on grids of 9 × 8 on the surface of 13 samples with different maturities. The test results showed that the presence of water during pyrolysis can significantly affect the shale sample’s mechanical characteristics. In higher temperatures and higher levels of maturity, the role of water becomes more pronounced. During hydrous pyrolysis, kerogen produces larger amounts of oil and bitumen, which become progressively porous. While the original sample showed a Young’s modulus value of more than 48 GPa, and it fluctuated between approximately 19 and 32 GPa during the HP scenario and between 17 and 34 GPa during the AHP process. In terms of hardness, the original sample exhibited an initial value of about 1.1 GPa and more mature samples reflected hardness values in the range of approximately 0.3 and 0.97 GPa in both scenarios. According to the trends of mechanical properties during maturation, mechanical properties decreased at the initial stage of maturation and remained relatively constant during the oil window. Then, another decline was detected at the wet-gas window’s closure. In the dry-gas window, HP and AHP scenarios exhibited different behaviors mainly due to the chemical structure of the kerogen residue.