Context. Polarisation observations of masers in the circumstellar envelopes (CSEs) around asymptotic giant branch (AGB) stars have revealed strong magnetic fields. However, masers probe only specific lines of sight through the CSE. Non-masing molecular line polarisation observations can more directly reveal the large-scale magnetic field morphology and hence probe the effect of the magnetic field on AGB mass loss and the shaping of the AGB wind. Aims. Observations and models of CSE molecular line polarisation can now be used to describe the magnetic field morphology and estimate its strength throughout the entire CSE. Methods. We used observations taken with the Atacama Large Millimeter/submillimeter Array (ALMA) of molecular line polarisation in the envelope of two AGB stars: CW Leo and R Leo. We modelled the observations using the multi-dimensional polarised radiative transfer tool PORTAL. Results. We found linearly polarised emission, with maximum fractional polarisation on the order of a few percent, in several molecular lines towards both stars. Towards R Leo, we also found a high level of linear polarisation (up to ∼35%) for one of the SiO v = 1 maser transitions. We can explain the observed differences in polarisation structure between the different molecular lines by alignment of the molecules through a combination of the Goldreich-Kylafis effect and radiative alignment effects. We specifically show that the polarisation of CO traces the morphology of the magnetic field. Competition between the alignment mechanisms allowed us to describe the behaviour of the magnetic field strength as a function of the radius throughout the circumstellar envelope of CW Leo. The magnetic field strength derived using this method is inconsistent with the magnetic field strength derived using a structure-function analysis of the CO polarisation and the strength previously derived using CN Zeeman observations. In contrast with CW Leo, the magnetic field in the outer envelope of R Leo appears to be advected outwards by the stellar wind. Conclusions. The ALMA observations and our polarised radiative transfer models show the power of using multiple molecular species to trace the magnetic field behaviour throughout the circumstellar envelope. While the observations appear to confirm the existence of a large-scale magnetic field, further observations and modelling are needed to understand the apparent inconsistency of the magnetic field strength derived with different methods in the envelope of CW Leo.