The television star will be staging cookery demonstrations at the Ginger Grouse Festival of Food & Drink Raceday, which takes place this weekend.
There will also be free activities for children available across the racecourse grounds, including bouncy castles, crazy golf, a bucking bronco and laser quest.
James said: "I love to explore the British countryside and am really looking forward to combining my love for cooking and the outdoors at the racecourse. Let's hope the sun is shining!".
On the track, seven races will have a total prize pot of £83,000.
As part of the racecourse's aim to raise £19,000 for Marie Curie Cancer Care this year, a fundraising raffle will take place with top prizes on offer.
Tickets for Sunday's event are £18 in advance or £20 on the day and are available to buy online at www.hamilton-park.co.uk, by calling 01698 283806 or at the gates on the day.