The Vienna Basin is a major hydrocarbon province with a long exploration history. Within the basin, secondary migration from Upper Jurassic source rocks into stacked Middle Miocene (Badenian) sandstone reservoirs was formerly considered to have occurred almost entirely along major fault zones. However recent exploration data has suggested that in areas where no major faults are present, oil may have migrated vertically through the sandy mudstone intervals separating individual reservoir units, which are therefore imperfectly sealed. In order to investigate possible secondary migration through the semi‐permeable mudstones, this study links variations in gross depositional environment (GDE) to variations in mudstone properties (e.g. mineralogy and pore size distribution). The study focussed on the mudstones which seal reservoir sandstones referred to locally as the “8.TH” and “16.TH” units. The bulk mineralogical composition of 56 mudstone and sandy mudstone (and minor intercalated muddy sandstone) samples from seal layers in 22 wells was studied by X‐ray diffraction analysis, broad ion beam – scanning electron microscopy (BIB‐SEM), mercury intrusion porosimetry (MICP) and N2 adsorption. These data are interpreted in the context of GDE maps of the Vienna Basin which were previously established using seismic and well log data.Results indicate that the gross depositional environment strongly controlled the pore space characteristics of the mudstones. The sandy mudstones in the NW part of the study area were influenced by a complex eastward‐prograding deltaic system which deposited coarse detritus into a major palaeo depression (“Zistersdorf Depression”) located in the centre of the basin. Higher overall porosity and a dominance of larger pore size classes, probably resulting in reduced seal quality, were observed for sandy mudstones from well locations within feeder channels and also from within the Zistersdorf Depression. Similarly, sandy mudstones from locations associated with the long‐term input of coarser sediments in shoreline, coastal and proximal offshore settings in the NW and central parts of the study area are considered to be of lower sealing quality compared to fine‐grained mudstones deposited in distal, open‐marine settings which prevailed in the SE part of the study area throughout the Middle Miocene.In general, pore geometries were influenced by mineralogical composition; quartz‐ and detrital carbonate‐rich samples show equidimensional pores, while more elongated pores (with a higher average aspect ratio) characterize clay‐rich samples. Furthermore, matrix mesopores (2‐50 nm) determined by N2 sorption are more abundant in clay‐rich versus quartz‐rich samples, and show a pronounced positive trend with increasing percentage of illite‐smectite mixed‐layer clay minerals.This study shows that regional‐scale mudstone seals in the Vienna Basin have been influenced by variations in sedimentation associated with lateral variations in gross depositional environment during the Middle Miocene. The observed pore characteristics will serve as input data for future models of secondary migration.