I always figured that since Castle had multiple Derek Storm books there would be multiple Nikki Heat books as well, allowing the show to continue as needed. It surprised me that it actually was addressed as a plot point.
I got the impression that there was always the potential for more NH books -- which might be why he was still hanging around -- but accepting the "certain British secret agent" offer would've precluded Castle from doing any more NH books at least for several years. So it was a choice between doing more NH and doing Bond. And when Heat Wave premiered so strongly, the publisher made Castle a firm offer for three more books, making it definite rather than potential, and offered an even bigger advance than he would've gotten for the Bond books, perhaps because the publisher was aware of the Bond offer and wanted to make sure Castle stayed where he was.
And I still don't get why they'd hire a mystery writer to do a spy series.