We consider the asymmetric simple exclusion process (ASEP) on the one-dimensional lattice {1, 2, . . . , N }. The particles can be created/annihilated at the boundaries with timedependent rate. These boundary dynamics are properly accelerated. We prove the hydrodynamic limit of the particle density profile, under the hyperbolic space-time rescaling, evolves with the entropy solution to Burgers equation with Dirichlet boundary conditions. The boundary conditions are characterised by boundary entropy flux pair.