We modeled liquid oxygen using ab initio molecular dynamics in which both the atomic structure and the noncollinear magnetic structure evolve without constraints. The atomic structure shows preference for parallel alignment of first-neighbor molecules and is supported by an excellent agreement between theoretical and experimental nuclear structure factors. The magnetic structure shows short-range antiferromagnetic correlations in agreement with spin-polarized neutron diffraction data. The observed correlations primarily result from appropriate trajectories of colliding O-2 molecules. The simulation provides evidence for the occurrence of long-living O-4 molecular units.