I wrote just a bit about fictional characters and the struggle to make them real people who fit the story, even if it means letting the character be in charge, in a manner of speaking.
But what happens when you create a character and you realize that he or she simply isn't working out?
I've had a couple of experiences of that, and unfortunately I've dealt with it the right way and the wrong way.
The wrong way is something that happens when you're still an inexperienced writer trying to get a feel for this whole process. You've done all sorts of world-building; you've crafted an original plot; you've got the settings and themes all lined up; the dialog is working well. There's just one problem--the main character is flat, dull, unlikable, or just plain wrong, a jarring note in an otherwise decent novel.
So, what happens next? If you're like my younger self, you grimly carry on with the story while a festering dislike of the main character grows to the point where you just plain give up on the book. If the main character, or even an important side character, has evolved in a way that does not fit the story he or she can mean the end of the whole project (or, at least, the temporary shelving of it; writers are always optimistic about salvaging what they can from unpublished manuscripts).
Why would any writer do this? Honestly, because the right way involves something that is difficult at best and terrifying at worst: you have to get rid of the wrong character and replace him or her with the right one.
But depending on just how important the character is to the story, and just how entangled his or her presence has already been with the other characters, the plot elements, etc., this is potentially going to involve a massive amount of work. In my early years as a writer there's no way I would have tried, and even now, there is nothing that is more annoying than realizing that even a fairly important side character is sounding a persistent wrong note in the story.
My first successful character replacement came near the middle of my Tales of Telmaja series. The series involves the adventures of twenty extremely gifted people, all of them from a race of people who can teleport and are thus responsible for space travel (the story of how I ended up with twenty characters all of whom were important to the book is pretty funny, but we'll save it for now). I had decided to create one of these characters as a sweet, nice sort of girl, a counterpoint to some of the other female characters in the group. And I thought it would be interesting to make her quite beautiful, too. Then it seemed like a good idea for her to be related to a side character the readers would already know by that point.
I wrote this girl in toward the end of this particular book (plot reasons dictated that she not show up until then). But almost from the beginning I knew something was wrong. She didn't seem to fit the mold of the twenty mythical heroes I was trying to create. She made some of the other important characters speak and act strangely. It was as though I had created a fairy-tale princess and plunked her down into a science fiction book for no good reason. Worst of all, she was rather unintelligent and didn't seem to have anything to offer--she was a puppet, blinking and waiting for me to pull her strings.
When I realized that she didn't work, I wasn't exactly thrilled. The amount of rewriting that would be necessary was daunting, and I still didn't know at that point how to replace her. I spent some time thinking about what kind of character this next girl really needed to be, and as soon as I started writing her into the story I had that comforting sensation every author knows, the sensation that you are dealing with someone real who is not anybody's puppet and who will utterly refuse to do things that aren't in character for her.
Once I had the character, I had to erase the first girl, and it wasn't easy. This new girl couldn't be related to anybody we already knew, and she wasn't staggeringly beautiful or particularly nice. But she fit the world and the story, and ended up playing an important role all the way through the rest of the series.
The bottom line here is: if one of your characters annoys you not because you are writing him or her to be annoying, but because he or she doesn't seem real and doesn't fit the story at all, don't put off the decision to replace the character. The sooner you realize someone doesn't work, the less rewriting you will have to do--but you will have to do it, if you don't want the manuscript to end up in a pile of potential future re-dos instead of becoming a viable work.