The structure and magnetic properties have been investigated by means of X-ray diffraction and magnetization measurements. The Er2AlFe16-xMnx (x=1, 2, 3, 4, 6 and 8) compounds have a hexagonal Th2Ni17-type structure. The thermal expansion of Er2AlFe16-xMnx (x=1, 2, 3, and 4) compounds have been investigated by X-ray dilatometry in the temperature range 103—654K. The results show that there is a thermal expansion anomaly at low temperature and a negative thermal expansion near the Curie temperature. There exists a strong and anisotropic spontaneous magnetostriction in the magnetic state of Er2AlFe16-xMnx compounds. The spin reorientation at low temperature results in an enhancement of the spontaneous volume magnetostrictive deformation of Er2AlFe16-xMnx compounds. Magnetization measurement shows that the Curie temperature and the spontaneous magnetization at 5K of Er2AlFe16-xMnx compounds decrease rapidly with increasing x, and that the Mn substitution for Fe results in obvious change of the magnetic anisotropy.