Bayesian network (BN) is an important tool in probabilistic seismic risk analysis (PSRA) due to its holistic nature and powerful probabilistic inference capabilities. However, while the information that can be stored by BN includes variable values, probability distributions, and relationships between variables, it does not involve event quantities. The results obtained from PSRA and probabilistic seismic hazard analysis (PSHA) are commonly frequency‐related (the number of occurrences per unit time), fundamentally describing event numbers. BN assumes a fixed event number relationship between nodes, but the aftershock counts vary for different mainshock magnitudes. This limitation further restricts its effectiveness in lifespan PSRA for structures. Therefore, this study aims to propose an enhanced BN (EBN) for modeling aftershock PSHA (APSHA) considering frequency information. This paper first introduces the modeling method using BN, including PSHA and a simplified model of APSHA using Båth's law. Next, an EBN that can effectively address frequency issues between the mainshock and aftershocks is presented for modeling APSHA considering the modified Omori's law, while the mathematical principles of both forward and backward inferences for the EBN are elaborated in detail. Then, the article carefully analyzes the utilization of the EBN for APSHA modeling under different scenarios where the information regarding the mainshock is known to varying extents, followed by the extension of the EBN in a time domain to obtain time‐dependent aftershock hazard. Finally, an example of APSHA in a specific location in China is illustrated.