The 18-time champion reached the unprecedented milestone on Mountain Tunes in the 15:10 GMT race.
McCoy finished fifth on Church Field in the 14:10 GMT handicap hurdles.
His 3,999th win came at Chepstow on Wednesday after switching to Jonjo O'Neill's-trained Minella For Steak when original ride Mission Complete was declared a non-runner.
Sent off the 6/4 favourite, Mountain Tunes looked to be struggling on the home turn but gradually closed in upon leader Kris Spin from the second-last flight and under the kind of determined drive that has become McCoy's trademark, he got up in the last strides to score by half a length in the colours of owner JP McManus, with whom so many of his recent successes have been shared.
"It's incredible - I didn't think he was going to do it," McCoy's wife Chanelle told At The Races amidst chaotic scenes in the Towcester winner's enclosure.
"Our hearts were absolutely in our mouths. Everybody is here, his father, his brother, Mr McManus. We'll be celebrating tonight in our pub The Outside Chance."
"It couldn't have gone any better," the rider added, before getting drenched with champagne from his weighing-room colleagues. "It's amazing - the racing people are fantastic. I'm so pleased I did it for Jonjo and JP and [McManus' wife] Noreen, who have been so good to me."