I recently ran across an article about secondary characters I'd saved for future reference. It seems serendipitous since I'm having a problem with a secondary character in one of my manuscripts. The article gave tips on how to make minor or secondary characters come alive so they didn't come across as two dimensional.
I have the exact opposite problem. My character came to me fully formed, popping into my head one night when I was unable to sleep and had spent the last hour or more staring at the ceiling in the dark. He told me his backstory, how he met and became friends with the main character (MC), and why he needed to be included in the MC's story. The problem is that he keeps showing up on the page and hijacking the scenes he's in. I'm fighting like crazy to keep him from taking over the book.
This isn't the first time this has happened to me. When I wrote my short story, The Muse, I planned on having a minor secondary character who helped the heroine. Not sure how this character was going to interact with the heroine, I just started writing. Well, that secondary character flowed out of my fingers onto the page like a genie escaping his lamp. He told me his name was Lazarus and that he was the heroine's protector. Soon he was pushing his way into scenes he didn't belong, and taking over those he needed to be present in. I reined him in as best as I could and as soon as I finished the short story, I wrote Lazarus' story, An Unexpected Gift.
I find the best way to deal with a secondary character that starts running away with the story is to open a new word document and record whatever he or she does and says that doesn't fit the particular scene I'm trying to write. I save the document as a separate file and label it with the character's name. This allows me to focus on the main character(s) in the current manuscript while not losing all the "good" stuff relating to the secondary character. If I seem to be putting a lot of stuff in this file, then I start thinking about giving the character his/her own story.