R. A. Salvatore was working on a Forgotten Realms novel starring a barbarian named Wulfgar. His editor called and told him the book needed a sidekick... now. Salvatore panicked for a moment, then says, "A drow.... Yeah, a drow ranger.... Drizzt Do'Urden, of D'aermon N'achezbaeron, Ninth House of Menzoberranzan." Thus began the life of the dark elf that launched a million copycats (and mispronunciations).
When Louis Sachar was writing Holes, he used Stanley Yelnats as a filler name, planning to replace it later with a more normal name. He never did, and the weird name even ended up becoming a plot point.
James Joyce was plagued by problems with his eyes. This led to a frequent need to employ the use of dictation when writing Finnegans Wake. During one session, someone knocked on the door and Joyce said, "Come in," which the typist accidentally added to the text. Joyce told him to keep it.