Fe2P-type compounds exhibit a giant magnetocaloric effect (MCE) and are extensively studied for room temperature applications. The reduction of their transition temperature below 77 K can pave the way for the potential application of these materials for hydrogen liquefaction using cryogenic magnetic refrigeration. Most of the known magnetocaloric materials with a giant MCE below 77 K are rare-earth-based compounds. In order to explore the possibility of developing rare-earth-free compounds with cryogenic MCE, we collected a dataset by conducting data mining on published experimental results on Fe2P-type magnetocaloric compounds and used machine learning for composition optimization aiming at lowering the transition temperature below 77 K. Guided by the predictions of an artificial neural network, we found a promising composition of Mn1.70Fe0.30P0.63Si0.37 with a transition temperature of 97 K at 1 T magnetic field which was lowered to 73 K by the minor substitution of Fe with Co. The developed rare-earth-free compounds exhibit a large magnetocaloric performance in isothermal magnetic entropy change (∆SM) of 7.5–11.5 J/kgK at the temperatures below 100 K. This study demonstrates that data-driven development of magnetocaloric materials can efficiently boost the optimization of their properties, thus aiding the practical applicability of magnetic refrigeration technology.