Physics-informed neural networks (PINNs) have received great attention as a promising paradigm for forward, inverse, and surrogate modeling of various physical processes with limited or no labeled data. However, PINNs are rarely used to predict two-phase flow in heterogeneous and fractured porous media, which is critical to lots of subsurface applications, due to the significant challenges in their training. In this work, we present an Enriched Physics-Informed Neural Network (E-PINN) to overcome these barriers and realize the simulation of such flow. Specifically, the Embedded Discrete Fracture Model (EDFM) is adopted to explicitly represent fractures, and then the finite volume method (FVM) instead of the Automatic Differentiation (AD) is used to evaluate spatial derivatives and construct the physics-informed loss function, so that the flux continuity between neighboring elements with different properties (e.g. matrix and fracture) can be defined rigorously. Besides, we develop a novel physics-informed neural network (NN) architecture adopting the adjacency-location anchoring, adaptive activation function, skip connection and gated updating to enrich the pressure information and enhance the learning ability of NN. Additionally, the initial and boundary conditions are constrained through a hard approach, which encodes them into network design, to improve the accuracy and efficiency of network training. In order to further reduce the difficulty of training, the Implicit-Pressure Explicit-Saturation (IMPES) scheme is used to calculate pressure and saturation, in which only the pressure needs to be solved by training NN. Finally, the superiority and applicability of E-PINN to complex practical problems is demonstrated through the simulations of immiscible displacement in 2D/3D heterogeneous and fractured reservoirs.