Another ‘devil’ expression, meaning reckless, careless, light-hearted.
This phrase is part of a longer idiom: ‘The devil may care, but I do not.’
Some dictionaries state that the first published use of the expression was 1837, though none of them give a reference source to support the claim.
However, it appears in The Pickwick Papers by Charles Dickens, which was published in 1837. Chapter 29 opens with this paragraph:
“In an old abbey town, down in this part of the country, a long, long while ago–so long, that the story must be a true one, because our great-grandfathers implicitly believed it — there officiated as sexton and grave-digger in the churchyard, one Gabriel Grub. It by no means follows that because a man is a sexton, and constantly surrounded by the emblems of mortality, therefore he should be a morose and melancholy man; your undertakers are the merriest fellows in the world; and I once had the honour of being on intimate terms with a mute, who in private life, and off duty, was as comical and jocose a little fellow as ever chirped out a devil-may-care song, without a hitch in his memory, or drained off a good stiff glass without stopping for breath.”
It’s unlikely that Charles Dickens was the first to use the expression, since it also appeared in The Warwickshire Hunt from 1795 to 1836, written by an author known only as Venator. This also was published in 1837. In the prefatory remarks, the following is found:
“This is the sort of witchering, not easily defined — but, by its votaries, pretty sensibly felt, in hunting the fox. The light-hearted high-spirited stripling, when cigaring it careless to cover, with a kind of a knowing demi-devil-may-care twist of his beaver, receives in his transit a benison from every real friend of the chase he may chance to pass.”
The phrase could have arisen even earlier, back in the 1720s. This is based on the theory that the spirit of the idiom is a result of the Golden Age of Piracy (1715 – 1725) where, on the high seas, pirates recklessly went about their business with no worry or concern as to any consequences resulting from their actions. The only being that might care about their actions would be, of course, the devil, and therefore the expression.
And, since I can’t find any further information, I’ll simply say, ‘the devil with it!’