In this paper, we investigated the dynamics of a bubble rising inside ratchet channels filled with viscoelastic liquids by means of volume-of-fluid-based direct numerical simulations. The exponential Phan–Thien–Tanner constitutive model was used to describe the rheological behaviors of the nonlinear viscoelastic fluid. The effects of fluid elasticity [characterized by the relaxation time (λ)] and ratchet angle (θ) are mainly discussed in respect of bubble dynamics (e.g., rising velocity, flow field, and stress field, etc.). Our results found that the bubble rise velocity increases with fluid elasticity, and the average bubble velocity can be reduced up to 20% at low elasticity in ratchet channels. In addition, the periodic arrangement of the ratchet influences the distribution of the stress field, the vorticity component, and also the deformation of the entangled polymers in the flow. It was observed that the distributions of the stress field and the trace of the conformation tensor change significantly in a dense ratchet channel compared to a sparse one. Interestingly, the bubble velocity gradually increases after the bubble emerges from the convergent section, whereas it decreases on approaching the convergent section. The dynamical bubbles can be manipulated by the surrounding fluid viscoelasticity and ratchet channels, which will be useful in oil extraction and chemical process involving complex non-Newtonian fluids.