Classical names were given by masters to slaves from the very beginning of the slave trade.
Classical names abound in eighteenth-century slave records. Even though slaves were not, as a rule, given new names until sold to their new owners, the few instances of slave traders or sailors naming their cargo before they even reached America indicate that these chained Africans were dubbed Caesar, Nero, or Pluto, or, as the first two names on one list of cargo, Primus and Secundus.
Inscoe, John C. “Carolina Slave Names: An Index to Acculturation.” The Journal of Southern History, vol. 49, no. 4, 1983.
These names originated from a peculiar wit: the names of classical heroes were given to slaves as an ironic insult to their status as slaves.
important edit, 2020: My initial answer here attributed this practice to Southerners. In fact, the evidence that exists may show that the practice was more common in the North. Notably, the Northern novelist James Fenimore Cooper remarked on the practice and exaggerated it in his work. Instead of graphically depicting the physical abuses of slavery, he used classical names as a shorthand, giving them to 77% of his black characters. In one of his novels featuring an outspoken slave, he writes:
The negro had been christened Scipio Africanus, by a species of witticism which was much more common to the Provinces than it is to the States of America, and which filled so many of the meaner employments of the country, in name at least, with the counterparts of the philosophers, heroes, poets, and princes of Rome.
James Fenimore Cooper, "The Red Rover" (1855)
A scholar has added this analysis:
Cooper’s contention that such mock heraldry was more common to the colonies than to the states is borne out in part by statistics available for black male slaves. From his classification of 340,000 black names collected by Newbell Niles Puckett, Murray Heller lists 5.3% (59 of 972) drawn from classical and literary sources between 1700 and 1800, but only 3.1% (211 of 7,700) between 1800 and 1860.
If Cooper exaggerated the frequency of grandiose names among American blacks, he had ample evidence in the North for the widespread currency of this kind of sick humor. Rosters of Negroes sold at auction and accounts of runaway slaves abound with such names. Of the 161 slaves indicted for plotting a resurrection in New York in 1741, about a quarter bore inappropriately high-sound appellations, twenty-four of which were the names of famous Greeks and Romans. There is also evidence that this naming practice existed in the South, though apparently, as Puckett indicates, with much less frequency than “some writers on plantation life would have us think.”
Warren S. Walker, “Selected Name Lore in the Fiction of James Fenimore Cooper,” New York State Folklore 5, no. 1 (1979 ), 23-41, citing Murray Heller, ed. Black Names in America: Origins and Usage (Boston, 1975), pp. 23-24 and 93.
I return to the original answer below but it should be noted that additional analysis might be helpful here.
To the extent that the practice was adopted in the South, it also had the purpose of demonstrating to visitors the plantation owner's own learning.
Southerners prided themselves on their knowledge and appreciation of Græco-Roman civilization and often stressed the many similarities between it and their own society, not the least of which was the institution of slavery.
Occasionally a name insulted the specific personality of the slave, but more often it created a vague Classical aura which gradually lost its degrading tone.
All but one of eight slaves named in William Yeates's 1751 will were named for Roman gods or heroes. The names of almost a third of South Carolina runaway slaves [...] were of Greek or Roman origin [...] there seems to have been little correlation between the original ancient figure and his black namesake, except for an occasional dim-witted male slave named Plato or Socrates or a sexually promiscuous girl named Venus or Aphrodite. Thus, the intent of the owner in bestowing these names would have been too subtle or tenuous for the slave to have detected anything insulting about them. Nor can one assume that all of these names were first applied by masters for satiric or condescending reasons, particularly once the practice became commonplace.
The practice of having masters name slaves was widespread throughout the US.
Slave children, in fact, were often, if not usually, actually named by the master or mistress. [..] Classical names, although less numerous than certain writers on plantation life would have us think, also probably reveal the hand of
the master class. Our slave list includes the following: Achilles,
Augustus, Bachus, Brutus, Calypso, Cassius, Cicero [...] Scylla, Silla, Siller, Sylla.
Puckett, "Names of American Negro Slaves," in Murdock, ed., Studies in the Science of Society (New Haven, 1937), pp. 471-494.
This 1937 source claims elsewhere that classical names were also common in the white population, but this is not born out by census data.
Like place-names and day-names, classical names were rarely found among the slaveholders. These names were associated almost exclusively with slaves. Prior to 1800, classical names accounted for about 20 percent of names given to male slaves born on the Ball plantation. During the nineteenth century, the share of classical names declined to about 10 percent.
Cody, Cheryll Ann. “There Was No ‘Absalom’ on the Ball Plantations: Slave-Naming Practices in the South Carolina Low Country, 1720-1865.” The American Historical Review, vol. 92, no. 3, 1987, pp. 563–596.
Ulysses S. Grant (né Hiram Ulysses Grant) was born in Ohio to an originally Puritan family who probably had different ideas about naming; the 1937 source observes that the prominence of the name Ulysses probably derives from him, not from antebellum names.
20th century historians remark on the classical interests of slave owners, but 21st century historians have been unable to avoid noticing the inherent cruelty in assigning someone a name that serves as a source of fun. They also observe that the names tend to play on skin color, either through reference to ancient Africans, or through juxtaposition.
"Such names functioned as cruel jokes: for instance, Scipio, a common male slave name, referred to the Roman general Publius Cornelius Scipio Africanus, whose agnomen, Africanus, meant “the African,” in praise of his triumphs in battle in North Africa." (Abel, Tyson, and Palsson, 2019. "From Enslavement to Emancipation: Naming Practices in the Danish West Indies." Comparative Studies in Society and History, 61(2), pp.332-365.)
"Such names served to reinforce the idea of Africans as embodiments of exotic alterity, but also invited pointed comparison between the appearance and circumstances of the slave and the illustrious personage referenced by his name. These were names to call as a joke, names whose grandiosity humiliated: Ignatius Sancho, Gustavus Vassa,
Julius Soubise." (Susan Benson, "Injurious names: naming, disavowal, and recuperation in contexts of slavery and emancipation." Vom Bruck and Barbara Bodenhorn, eds. The anthropology of names and naming. Cambridge: Cambridge University Press, 2006.)
"[The literate slave trader] chose not to speak of Venus, the other dead girl. The pet name licensed debauchery and made it sound agreeable." (Saidiya Hartman, Lose your mother: A journey along the Atlantic slave route. Macmillan, 2008.)