Oh, gosh, yes. One of my favorite all-time characters first started off as a secondary character in a fantasy novel I wrote. Secondary isn't even a good word for it -- he was marginal at the most. And then one night, I was writing, and out of nowhere, he quipped out the most wonderful, arrogant, sarcastic line of dialogue. I have no idea where it came from, but I sat there, blinking at the computer screen, thinking, "I like this guy." From there, he blossomed into one of the leading characters in the book.
That book, btw, was the introductory volume in a series. Another character, who had a modest role, was carried over to the sequel. I wrote a scene describing his appearance by way of reintroducing him to readers and introducing him to the sequel's storyline, and for whatever reason, it occurred to me at that moment that he was a fantastic character, one I could do a lot with -- so I did. He became not only one of the principle heroes of that book, but when on to be the main protagonist of the third book in the series. And my all-time, absolute most favorite character, come to think of it, LOL.