I have read historical New Zealand newspapers from 1897 where reporters casually label Maori's as 'niggers', the same in Australia with Aboriginals, so I am interested in the global view rather than one confined to the United States. Thank you, and I apologize if the question raises any offense.
I can't speak for New Zealand and their relationship with the Maori people, but as for Australia and the Aboriginals, in 1897 Aboriginals were not yet included in the census or have anywhere near equal rights, and wouldn't be for decades. So it is most likely due to this inequality that it was still a derogatory word for the aboriginals, it just wasn't considered socially unacceptable to be derogatory towards them at that point in time.
Then as time progressed and Aboriginals gained equal rights and status as the rest of Australia, it has slowly become less and less acceptable to refer to them as that, depending on the region that you travel to.
EDIT: Wording.
I asked a similar question a couple weeks ago, if you want to see the answers there, you can click here.
I've written a little bit about the term's French correlative "nègre" in the eighteenth century. According to dictionaries and encyclopedias from the time, nègre did not only describe race (ie dark skin --not necessarily black or African descent) but was specifically tied to the notion of slavery. Pseudo-science from the time (and this is also reflected in the philosophical writings of Rousseau and Montesquieu) also argue that people with darker skin are less intelligent, less "civilized," and more "natural" (in the fact that they haven't developed modern technology that separates them from animals) and that they are more naturally adept at withstanding hard labor and hot temperatures. The 18th century thinkers were fond of classifying and ordering, and of course, since it was the white, European that was doing the ordering, they privileged that type of person as the most intellectually developed. When does this term become offensive? Likely when those who could be classified as nègre (like Toussaint Louverture or Alexandre Dumas) finally had a platform in Europe to illustrate that the connotations behind nègre were binding.