In this paper, direct numerical simulations (DNS) are performed to investigate the inline rise of a pair of three-dimensional (3D) air bubbles in a viscoelastic liquid using the volume-of-fluid approach with an adaptive mesh refinement technique. The exponential Phan-Thien–Tanner model is used as the non-linear viscoelastic constitutive equation for the liquid. The numerical model has been validated by comparison with previously published results, including the terminal velocity jump discontinuity of an isolated bubble rising in a viscoelastic fluid, when its volume exceeds a certain critical value. Focusing on the inline rising bubble pair in such a viscoelastic medium with different configurations, we found that the wake of the small leading bubble attracts a larger trailing bubble, whereas for a supercritical bubble in front of a subcritical bubble, they tend to further separate. Before reaching a critical volume, the two subcritical bubbles remain close to each other after approaching each other, forming a stable chain. For pairs containing a supercritical trailing bubble, however, a drafting–kissing scenario occurs before the bubble–bubble coalescence. The long-range repulsion and the short-range attraction due to fluid elasticity are critical to the aforementioned bubble pair interactions. Interestingly, the terminal rise velocities of the stable bubble chain and the coalesced bubble both increase with the initial spacing. The squeezing flow near the growing bubble neck seems to delay the coalescence process. The capillary wave propagating down to the coalesced bubble tip together with the extensional flow behind the stretched bubble determines the generation of satellite microdroplets along the tail of the coalesced bubble. To the best of our knowledge, this is the first 3D DNS on a bubble pair ascending in viscoelastic fluids.