Context. The existence of comets with heliocentric orbital periods close to that of Jupiter (i.e., co-orbitals) has been known for some time. Comet 295P/LINEAR (2002 AR 2 ) is a well-known quasi-satellite of Jupiter. However, their orbits are not long-term stable, and they may eventually experience flybys with Jupiter at very close range, close enough to trigger tidal disruptions like the one suffered by comet Shoemaker-Levy 9 in 1992. Aims. Our aim was to study the observed activity and the dynamical evolution of the Jupiter transient co-orbital comet P/2019 LD 2 (ATLAS) and its dynamical evolution. Methods. We present results of an observational study of P/2019 LD 2 carried out with the 10.4 m Gran Telescopio Canarias (GTC) that includes image analyses using a Monte Carlo dust tail fitting code to characterize its level of cometary activity, and spectroscopic studies to search for gas emission. We also present N-body simulations to explore its past, present, and future orbital evolution. Results. Images of P/2019 LD 2 obtained on 2020 May 16, show a conspicuous coma and tail, but the spectrum obtained on 2020 May 17, does not exhibit any evidence of CN, C 2 , or C 3 emission. The comet brightness in a 2.6 aperture diameter is r = 19.34±0.02 mag, with colors (g − r ) = 0.78 ± 0.03, (r − i ) = 0.31 ± 0.03, and (i − z ) = 0.26 ± 0.03. The temporal dependence of the dust loss rate of P/2019 LD 2 can be parameterized by a Gaussian function having a full width at half maximum of 350 days, with a maximum dust mass loss rate of 60 kg s −1 reached on 2019 August 15. The total dust loss rate from the beginning of activity until the GTC observation date (2020 May 16) is estimated at 1.9×10 9 kg. Comet P/2019 LD 2 is now an ephemeral co-orbital of Jupiter, following what looks like a short arc of a quasi-satellite cycle that started in 2017 and will end in 2028. On 2063 January 23, it will experience a very close encounter with Jupiter at perhaps 0.016 au; its probability of escaping the solar system during the next 0.5 Myr is estimated to be 0.53±0.03. Conclusions. Photometry and tail model results show that P/2019 LD 2 is a kilometer-sized object, in the size range of the Jupiterfamily comets, with a typical comet-like activity most likely linked to sublimation of crystalline water ice and clathrates. Its origin is still an open question. Our numerical studies give a probability of this comet having been captured from interstellar space during the last 0.5 Myr of 0.49±0.02 (average and standard deviation), 0.67±0.06 during the last 1 Myr, 0.83±0.06 over 3 Myr, and 0.91±0.09 during the last 5 Myr.