This study presents a thorough analysis of the sedimentology, diagenesis, and sequence stratigraphy of the Middle Jurassic Samana Suk Formation in the Hazara Basin of northern Pakistan. Focusing on two sections, namely Mera Rehmat and Por Miana, the research aims to unravel the complex geological processes within the formation. The examination of microfacies reveals nine distinct depositional textures, ranging from mudstone to wackestone, packstone, and grainstone, indicating various inner ramp environments such as open marine, lagoon, and coastal settings. Petrographic investigations shed light on diagenetic processes, including micritization, cementation, dissolution, compaction, neomorphism, and dolomitization. Six cementation types are identified, and the dolomitization patterns vary, providing insights into lagoonal environments and mudstone replacement. Sequence stratigraphic analysis uncovers intriguing patterns within the Samana Suk Formation. The high-stand system tract is characterized by mudstones, pelloidal grainstones, and dolomitized mudstones, indicating periods of high sea level. In contrast, the transgressive system tract displays ooidal grainstones, pelloidal packstones, and pel-bioclastic grainstones, representing transgression and inundation of previously exposed areas. A significant finding is the impact of diagenesis on reservoir quality parameters, specifically porosity, and permeability. Diagenetic processes, cementation types, and dolomitization patterns have significantly altered the pore network, highlighting the importance of considering diagenesis in assessing the Samana Suk Formation as a hydrocarbon reservoir. This research provides a comprehensive understanding of the sedimentology, diagenesis, and sequence stratigraphy of the Middle Jurassic Samana Suk Formation. The findings contribute to our knowledge of similar carbonate reservoirs globally, enhancing the exploration and development of hydrocarbon resources in comparable depositional environments.