Neutron powder diffraction on the binary intermetallics Er5Mg24 and Tm5Mg24 confirms their isostructural and pure crystallization in the Ti5Re24-type structure (space group I 4 3m, Z = 2)with rare earths located in 2a(0,0,0) and 8c(x,x,x) and Mg in two different 24g(x,y,x) sites. Room temperature lattice constants are 11.263(2) Å and 11.215(1) Å for the Er and Tm compound, respectively. Atomic positions have been refined. Both compounds order ferromagnetically below Curie temperatures of 17.5(5) K and 7.5(5) K for Er5Mg24 and Tm5Mg24, respectively. The magnitudes of the Er moments at 4.2 K are 7.5(2) µB and 4.4(2)µB on the 2a and the 8c sites, respectively. The Tm moments which have been refined from 2 K measurements amount to 3.0(3)µB and 2.8(2) µB, respectively. The temperature dependencies of the magnetic Bragg intensities reveal distinct deviations from Brillouin curves for J = 15/2 (Er) and J = 6 (Tm) systems and indicate a complex magnetic exchange.