Eocene coal-bearing source rocks of the Pinghu Formation from the W-3 well in the western margin of the Xihu Sag, East China Sea Shelf Basin were analyzed using Rock-Eval pyrolysis and gas chromatography–mass spectrometry to investigate the samples’ source of organic matter, depositional environment, thermal maturity, and hydrocarbon generative potential. The distribution patterns of n-alkanes, isoprenoids and steranes, high Pr/Ph ratios, abundant diterpanes, and the presence of non-hopanoid triterpanes indicate predominant source input from higher land plants. The contribution of aquatic organic matter was occasionally slightly elevated probably due to a raised water table. High hopane/sterane ratios and the occurrence of bicyclic sesquiterpanes and A-ring degraded triterpanes suggest microbial activity and the input of microbial organisms. Overwhelming predominance of gymnosperm-derived diterpanes over angiosperm-derived triterpanes suggest a domination of gymnosperms over angiosperms in local palaeovegetation during the period of deposition. The high Pr/Ph ratios, the plot of Pr/n-C17 versus Ph/n-C18, the almost complete absence of gammacerane, and the distribution pattern of hopanes suggest that the samples were deposited in a relatively oxic environment. Generally, fluctuation of redox potential is coupled with source input, i.e., less oxic conditions were associated with more aquatic organic matter, suggesting an occasionally raised water table. Comprehensive maturity evaluation based on Ro, Tmax, and biomarker parameters shows that the samples constitute a natural maturation profile ranging from marginally mature to a near peak oil window. Hydrogen index and atomic H/C and O/C ratios of kerogens suggest that the samples mainly contain type II/III organic matter and could generate mixed oil and gas.