The crystal structure of racemic afoxolaner has been solved and refined using synchrotron X-ray powder diffraction data and optimized using density functional theory techniques. Afoxolaner crystallizes in space group P21/a (#14) with a = 9.6014(6), b = 14.0100(11), c = 39.477(10) Å, β = 94.389(7)°, V = 5,294.7(17) Å3, and Z = 8 at 298 K. The crystal structure consists of layers of molecules parallel to the ab-plane. The boundaries of the layers are rich in halogens. Within the layers, there is parallel stacking of rings along both the a- and b-axes. Two classical N–H···O hydrogen bonds link the two independent molecules into dimers. The powder pattern has been submitted to the International Centre for Diffraction Data (ICDD®) for inclusion in the Powder Diffraction File™ (PDF®).