Context. The role of magnetic fields during the formation of high-mass stars is not yet fully understood, and the processes related to the early fragmentation and collapse are as yet largely unexplored. The high-mass star forming region G9.62+0.19 is a well known source, presenting several cores at different evolutionary stages. Aims. We seek to investigate the magnetic field properties at the initial stages of massive star formation. We aim to determine the magnetic field morphology and strength in the high-mass star forming region G9.62+0.19 to investigate its relation to the evolutionary sequence of the cores. Methods. We made use of Atacama Large Millimeter Array (ALMA) observations in full polarisation mode at 1 mm wavelength (Band 7) and we analysed the polarised dust emission. We estimated the magnetic field strength via the Davis-Chandrasekhar-Fermi and structure function methods. Results. We resolve several protostellar cores embedded in a bright and dusty filamentary structure. The polarised emission is clearly detected in six regions: two in the northern field and four in the southern field. Moreover the magnetic field is orientated along the filament and appears perpendicular to the direction of the outflows. The polarisation vectors present ordered patterns and the cores showing polarised emission are less fragmented. We suggest an evolutionary sequence of the magnetic field, and the less evolved hot core exhibits a stronger magnetic field than the more evolved hot core. An average magnetic field strength of the order of 11 mG was derived, from which we obtain a low turbulent-to-magnetic energy ratio, indicating that turbulence does not significantly contribute to the stability of the clump. We report a detection of linear polarisation from thermal line emission, probably from methanol or carbon dioxide, and we tentatively compared linear polarisation vectors from our observations with previous linearly polarised OH masers observations. We also compute the spectral index, column density, and mass for some of the cores. Conclusions. The high magnetic field strength and smooth polarised emission indicate that the magnetic field could play an important role in the fragmentation and the collapse process in the star forming region G9.62+019 and that the evolution of the cores can be magnetically regulated. One core shows a very peculiar pattern in the polarisation vectors, which can indicate a compressed magnetic field. On average, the magnetic field derived by the linear polarised emission from dust, thermal lines, and masers is pointing in the same direction and has consistent strength.