[A humble request: If you can, please donate to help me carry on tracing word histories. Thank you.]
The verb to ghostwrite means: to write a book, an article, etc., for another person, under whose name it is then published.
The noun ghostwriter designates a person who writes a book, an article, etc., for another person, under whose name it is then published.
These are, in chronological order, the earliest occurrences of the verb to ghostwrite and of the noun ghostwriter that I have found:
1-: From Bohemia in London (New York: Dodd, Mead & Company, 1907), by the British journalist and author Arthur Michell Ransome (1884-1967) [pages 193 to 195]:
—Note: The past participle ghostwritten (here used as an adjective) presupposes the existence of the verb to ghostwrite:
Ways and Means
A little time ago there was a great outcry against what was called “literary ghosting,” a fraudulent passing off of the work of unknown writers under more famous names. There was a correspondence in a literary paper that betrayed how novels were written in the rough by inexperienced hands under the guidance of hardened manufacturers of serials; and, indeed, when we consider only how many prominent athletes of no particular literary ability are able to publish books on their profession, it is obvious that a good deal of this kind of business must be done. Indeed, in one form or another, ghosting is one of the usual ways by which the unfortunate young writer sustains himself in Grub Street, or Bohemia, or whatever else you like to call that indefinite country where big longings and high hopes are matched by short purses and present discomforts.
Many a man has been saved from what seemed a descent into the drudgeries of clerkship by the different drudgery of writing, say, the reminiscences of an admiral, the history of a parish, or innumerable short reviews, for which other people got the credit. […]
Nowadays the matter has been reduced to system. There are men who are paid to write all the reviews in a paper, and farm out the work piecemeal, or even get ambitious boys and girls to do it for them, by way of apprenticeship, paying them a meagre wage. There are agents who make a living by supplying ghost-written books to publishers who keep up for appearance sake the pretence of not being in the know. They get their twenty, forty, fifty pounds a volume, and have them written by impecunious Bohemians to whom they pay the weekly salary of a junior clerk.
2-: From The Lincoln Daily Star (Lincoln, Nebraska, USA) of Thursday 23rd July 1908 [page 4, columns 4 & 5]:
METHODS OF NEW YORK “GHOST” WRITER
Another “Three Weeks” is a-hanging and impending over New York City. The book is all written, the heated situations have been asbestos lined, and the ermine—nee tiger skin—rug is in front of the fireplace, where the hero can throw himself and goo-goo to his heart’s content. All is ready but the author. She hasn’t been found yet. In other words, one of the most talented ‘ghost’ writers in town has completed a new and highly erotic novel. The young lady has written five previous books, and they were fairly good books, too, and had a fairly good sale. But the names of well known and wealthy society women were appended to each as the author. The actual writer lives in a swell uptown apartment, picks up about $5,000 a year by her pen, and sidesteps the fame in honor of the hard cash. There are always women in society who long to pose as literary. Mostly these ladies couldn’t edit a laundry list without aid. They couldn’t write a menu without sticking out their tongues far enough for hens to roost on ’em. But they have that literary yen just the same, coupled with a fat bank account and a doting hubby. The signature may be attached. Thus the lovely lady gets the pose she desires, while the harmless, necessary writer in the background enjoys a summer on the beach, with a small, smelly runabout which, in her letters to friends, may be referred to as “my car.” There are a dozen or so known, catalogued and labeled “ghost” writers in town. Few of them have ever seen their names in print, but their product finds a ready sale in the bughouse circles of uptown society.
IN FRENCH
The French equivalent of the noun ghostwriter is the noun nègre, literally: negro—the reference being to servile work.
This particular usage of the French noun nègre is first recorded in the following from Journal et mémoires de Charles Collé sur les hommes de lettres, les ouvrages dramatiques et les événements les plus mémorables du règne de Louis XV (1748—1772) (Paris: Librairie de Firmin Didot Frères, Fils et Cie, 1868), by the French playwright and songwriter Charles Collé (1709-1783) [Vol. 2, July 1757, page 108]:
Il s’est trouvé que Monnet avoit un brouillon de l’un de ces opéra-comiques, intitulé le Drôle de corps ; il le fait achever par quelqu’un de ses nègres, et le donnera ces jours-ci.
translation:
It so happened that Monnet had a draft of one of those comic operas, entitled The Funny Body; he is getting it completed by one of his ghostwriters, and will give it shortly.