Recent observations indicate that the QSO heavy-element absorption line (HEAL) systems are associated with extremely large galactic halos. The origin of the absorbing gas, however, is not well understood. We demonstrate that an extremely large star formation rate is required if the HEAL gas originates from galactic disks. This is clearly incompatible with the observed moderate evolution and the normal colors of the galaxies associated with the Mg II absorption lines (MgALs). Studies of the H I high-velocity clouds, the Magellanic Stream, and recent observations of nearby QSOs suggest that the gas tidally torn out from the LMC/SMC system may be responsible for the MgALs observed in the Galactic halo. We therefore propose that the absorption lines originate from progressive gas accretion from satellite galaxies (or large gas clumps) as a result of dynamical friction and tidal interaction. We investigate two possible channels through which the gas is ejected from satellites and accretes onto the primary. The first is the direct tidal stripping by the primary's massive halo, in which case the torn-out gas is mostly in the form of clouds. The second is the satellite wind resulting from the heating by supernovae, whose rate may be enhanced by tidal interactions. Assuming singular isothermal spheres for both primary and satellite galaxies, we find that the radial density profile of the accreted gas in the primary's halo varies more rapidly than 1/R2. The total hydrogen column density is estimated to be approximately 10(20) cm-2 at a galactocentric distance of 50 kpc for a satellite such as Magellanic irregulars. Estimates of the velocity, the column densities, the time variations of the equivalent width, and the ionization structures are consistent with observed characteristics of MgAL systems. The gas accretion may account for not only the HEALs of low ionization states such as Mg ii but also of high-ionization species such as C IV observed at larger galactocentric distances.