  Context. Dense molecular filaments are ubiquituous in the interstellar
medium, yet their internal physical conditions and formation mechanism remain
debated. Aims. We study the kinematics and physical conditions in the Musca
filament and the Chamaeleon-Musca complex to constrain the physics of filament
formation. Methods. We produced CO(2-1) isotopologue maps with the APEX
telescope that cut through the Musca filament. We further study a NANTEN2
$^{12}$CO(1-0) map of the Musca cloud and the HI emission of the
Chamaeleon-Musca complex. Results. The Musca cloud contains multiple velocity
components. Radiative transfer modelling of the CO emission indicates that the
Musca filament consists of a cold ($\sim$10 K), dense (n$_{H_2}\sim$10$^4$
cm$^{-3}$) crest, which is best described with a cylindrical geometry.
Connected to the crest, a separate gas component at T$\sim$15 K and
n$_{H_2}\sim$10$^3$ cm$^{-3}$ is found, the so-called strands. The filament
crest has a transverse velocity gradient that is linked to the kinematics of
the nearby ambient cloud. Studying the large scale kinematics, we find
coherence of the asymmetric kinematics from the 50 pc HI cloud down to the
Musca filament. We also report a strong [C$^{18}$O]/[$^{13}$CO] abundance drop
by an order of magnitude from the filament crest to the strands over a distance
$<$ 0.2 pc in a weak far-ultraviolet (FUV) field. Conclusions. The dense Musca
filament crest is a long-lived (several crossing times), dynamic structure that
can form stars in the near future because of continuous mass accretion. This
mass accretion appears to be triggered by a HI cloud-cloud collision, which
bends the magnetic field around dense filaments. This bending of the magnetic
field is then responsible for the observed asymmetric accretion scenario of the
Musca filament, which is, for instance, seen as a V-shape in the
position-velocity (PV) diagram.
