The horses were sent out for a race during the time of Hajjaj. We said, "What if we went to watch the race?" So we went.Then we said, "What if we went to Anas bin Malik and asked him whether you used to hold horse races during the time of the Messenger of Allah ﷺ?" So we came to him and asked him.He said, "Yes. He raced a horse of his called Sabhah, and it outran the other horses, which delighted him and pleased him greatly."
حدثنا أبو كامل حدثنا سعيد بن زيد حدثنا الزبير بن خريت حدثنا
أرسلت الخيل زمن الحجاج فقلنا لو أتينا الرهان قال فأتيناه ثم قلنا لو أتينا إلى أنس بن مالك فسألناه هل كنتم تراهنون على عهد رسول الله ﷺ قال فأتيناه فسألناه فقال نعم لقد راهن على فرس له يقال له سبحة فسبق الناس فهش لذلك وأعجبه
Its chain of transmission is hasan. Haythami graded it sahih in 5/263, saying, "Its narrators are trustworthy." It is found in Darimi, 2/279, number 2430, in the chapter on jihad, on wagering on horse races. Wagering was permitted in horse racing because it is the foundation of jihad, and horses require constant training for it. What is permitted of this is the racing of horses and horsemen for the sake of encouragement, not for the spectators to place bets.