The asymmetric unit of the title compound, C23H23ClFN5O2, contains two crystallographically independent molecules. In one molecule, the pyrazole ring makes dihedral angles of 43.93 (7) and 35.82 (7)°, respectively, with the fluoro- and chloro-substituted benzene rings, while the corresponding angles in the other molecule are 52.26 (8) and 36.85 (7)°. The piperazine rings adopt chair conformations. In the crystal, adjacent molecules are connected via intermolecular N—H⋯O, C—H⋯F, C—H⋯N and C—H⋯O hydrogen bonds, forming a two-dimensional network parallel to the bc plane. The crystal structure is further stabilized by a weak π–π interaction with a centroid–centroid distance of 3.6610 (8) Å and by C—H⋯π interactions.