Coal measure source rocks, located in the Xihu Sag of the East China Sea Shelf Basin, were analyzed to define the hydrocarbon generation potential, organic geochemistry/petrology characteristics, and coal preservation conditions. The Pinghu source rocks in the Xihu Sag are mainly gas‐prone accompany with condensate oil generation. The coals and shales of the Pinghu Formation are classified from “fair” to “excellent” source rocks with total organic carbon (TOC) contents ranging from 25.2% to 77.2% and 1.29% to 20.9%, respectively. The coals are richer in TOC and S1+S2 than the shales, indicating that the coals have more generation potential per unit mass. Moreover, the kerogen type of the organic matter consists of types II‐III and III, which the maturity Ro ranges from 0.59% to 0.83%. Petrographically, the coals and shales are dominated by vitrinite macerals (69.1%–96.8%) with minor proportions of liptinite (2.5%–17.55%) and inertinite (0.2%–6.2%). The correlation between maceral composition and S1+S2 indicates that the main contributor to the generation potential is vitrinite. Therefore, the coals and shales of the Pinghu Formation has good hydrocarbon generation potential, which provided a good foundation for coal measure gas accumulation. Furthermore, coal facies models indicates that the Pinghu coal was deposited in limno‐telmatic environment under high water levels, with low tree density (mainly herbaceous) and with low‐moderate nutrient supply. Fluctuating water levels and intermittent flooding during the deposition of peat resulted in the inter‐layering of coal, shale and sandstone, which potentially providing favorable preservation conditions for coal measure gas.