I wrote some time ago about an idea of commissioning ebooks to finish off cancelled cliffhanger TV series, but since listening to I Should Be Writing, I realise that the idea of paying an author only in royalties is not the way it should be done. So the closest you'd get to this is for the studio to sell the ebook rights to a publisher who then farms out the work to an interested/talented author, including an advance. You would first have to convince everyone to invest more money in a failed TV project, though.
Mokalus of Borg
PS - TV shows only get cancelled when people don't want to put more money in.
PPS - And even then they don't want to sell the rights.