We study the angular-momentum (AM) buildup in high- z massive galaxies using high-resolution cosmological simulations. The AM originates in co-planar streams of cold gas and merging galaxies tracing cosmic-web filaments, and it undergoes four phases of evolution. (I) Outside the halo virial radius ( R v ~ 100 kpc), the elongated streams gain AM by tidal torques with a specific AM (sAM) ~1.7 times the dark matter (DM) spin due to the gas’ higher quadrupole moment. This AM is expressed as stream impact parameters, from ~0.3 R v to counter rotation. (II) In the outer halo, while the incoming DM mixes with the existing halo of lower sAM to a spin dm ~ 0.04, the cold streams transport the AM to the inner halo such that their spin in the halo is ~3 dm . (III) Near pericentre, the streams dissipate into an irregular rotating ring extending to ~0.3 R v and tilted relative to the inner disc. Torques exerted partly by the disc make the ring gas lose AM, spiral in, and settle into the disc within one orbit. The ring is observable with 30 per cent probability as a damped Lyman α absorber. (IV) Within the disc, 〈0.1 R v , torques associated with violent disc instability drive AM out and baryons into a central bulge, while outflows remove low-spin gas, introducing certain sensitivity to feedback strength. Despite the different AM histories of gas and DM, the disc spin is comparable to the DM-halo spin. Counter rotation can strongly affect disc evolution.