Aims. To explore the origin of high-velocity gas in the direction of the Large Magellanic Cloud, (LMC) we analyze absorption lines in the ultraviolet spectrum of a Galactic halo star that is located in front of the LMC at d = 9.2Methods. We study the velocity-component structure of low and intermediate metal ions (C ii, Si ii, Si iii) in the spectrum of RX J0439.8−6809, as obtained with the Cosmic Origins Spectrograph (COS) onboard the Hubble Space Telescope (HST), and measure equivalent widths and column densities for these ions. We supplement our COS data with a Far-Ultraviolet Spectroscopic Explorer (FUSE) spectrum of the nearby LMC star Sk −69 59 and with H i 21 cm data from the Leiden-Argentina-Bonn (LAB) survey.Results. Metal absorption toward RX J0439.8−6809 is unambiguously detected in three different velocity components near v LSR = 0, +60, and +150 km s −1 . The presence of absorption proves that all three gas components are situated in front of the star, thus located in the disk and inner halo of the Milky Way. For the high-velocity cloud (HVC) at v LSR = +150 km s −1 , we derive an oxygen abundance of [O/H] = −0.63 (∼0.2 solar) from the neighboring Sk −69 59 sight line, in accordance with previous abundance measurements for this HVC. From the observed kinematics we infer that the HVC hardly participates in the Galactic rotation. Conclusions. Our study shows that the HVC toward the LMC represents a Milky Way halo cloud that traces low column density gas with relatively low metallicity. We rule out scenarios in which the HVC represents material close to the LMC that stems from a LMC outflow.