The crystal structure of encorafenib, C22H27ClFN7O4S, has been solved and refined using synchrotron X-ray powder diffraction data, and optimized using density functional theory techniques. Encorafenib crystallizes in space group P21 (#4) with a = 16.17355(25), b = 9.52334(11), c = 17.12368(19) Å, β = 89.9928(22)°, V = 2637.50(4) Å3, and Z = 4. The crystal structure consists of alternating layers of stacked halogenated phenyl rings and the other parts of the molecules perpendicular to the a-axis. One molecule participates in two strong N–H⋯N hydrogen bonds (one intra- and the other intermolecular), which are not present for the other molecule. The intermolecular hydrogen bonds link molecule 2 into a spiral chain along the b-axis. The powder pattern has been submitted to ICDD for inclusion in the Powder Diffraction File™ (PDF®).