Stephen King was a high-school history teacher, and used to write in the furnace room (closet) of his trailer.
Michael Blake, the author of "Dances with Wolves", had just been fired from his job as a dishwasher in a Chinese restaurant when Kevin Costner called him to ask if he would be interested in writing a screen play of his book.
Dashiel Hammet was a private detective whose first case had been tracking down someone who had stolen a Ferris Wheel.
Barnaby Conrad was an amateur bull fighter and the personal assistant of Sinclair Lewis.
Robin Cook was a doctor, but that is no surprise.
John Grisham was a lawyer and a member of the State Legislature of Mississippi.
Graham Greene was a spy. (Or more politely, involved in intelligence.)
Jack London was an oyster pirate, and a gold prospector. (Probably not at the same time.)
Ian Fleming was "involved in intelligence". And in addition to the James Bond series, he also wrote the children’s book "Chitty Chitty Bang Bang", which became a Disney movie. He got the title from a "dirty" WW I soldiers’ song.
Scott Adams (Dilbert) was an engineer for Bell Telephone. He worked there even after he became a famous cartoonist, until he was laid off "for reasons that had nothing to do with his activities as a cartoonist."
These are all from memory. And I have less than I used to, so I’m finished.