YCo4-xFexB compounds have been investigated by means of neutron powder diffraction. Substitution of Co with Fe causes substantial modifications of the crystal structure. Iron occupies preferentially one (2c) of the two cobalt sites (2c and 6i). The Curie temperature of the material increases with Fe content from Tc=380 K for YCo4B, and concurrently a spin reorientation is suppressed. The magnetic phenomenology is explained in terms of the preferential occupation of Fe, which carries in the 2c sites an ordered magnetic moment almost double of that in the 6i sites. © 2001 American Institute of Physics.