"This viewpoint infuriates some critics of economics, to the extent that it earned the famous nickname of “the dismal science”. Too few people know the context in which Thomas Carlyle hurled that epithet: it was in a proslavery article, first published in 1849, a few years after slavery had been abolished in the British empire. Carlyle attacked the idea that “black men” might simply be induced to work for pay, according to what he sneeringly termed the “science of supply and demand”. Scorning the liberal views of economists, he believed Africans should be put to work by force."That's Tim Harford.
Wikipedia has more:
"However, the full phrase "the dismal science" first occurs in Carlyle's 1849 tract entitled Occasional Discourse on the Negro Question, in which he was arguing for the reintroduction of slavery as a means to regulate the labor market in the West Indies:
Not a "gay science," I should say, like some we have heard of; no, a dreary, desolate and, indeed, quite abject and distressing one; what we might call, by way of eminence, the dismal science.
It was "dismal" in "find[ing] the secret of this Universe in 'supply and demand,' and reducing the duty of human governors to that of letting men alone." Instead, the "idle Black man in the West Indies" should be "compelled to work as he was fit, and to do the Maker's will who had constructed him.""In which case I'm proud to be dismal.