I can’t understand why the phrase “for the life of me” isn’t “for the life of mine.” Mine is a possessive pronoun, not me. You don’t say, “Some friends of me.” You say, “Some friends of mine” OR “Some of my friends.” Me doesn’t convey—grammatically—possession, and it is neither a possessive adjective nor a possessive pronoun. Why, then, is the phrase “for the life of me”? What is the origin of the use of me in this way? Is there any historical usage of a possessive me, or is this simply an ungrammatical phrase i.e. an idiomatic phrase?

There's an almost identical question here. The comment that comes closest equates 'my life' with 'the life of me', but the answers in general don't focus so much on the grammar of 'the life of me'.
– S ConroyAug 14 '18 at 19:50

1

The phrase isn't really about life or whose life it is. It's a canned phrase, an expression of exasperation. It's an idiom.
– fixer1234Aug 15 '18 at 2:32

@fixer1234 And is there a rule stating that idioms don't have to be grammatical?
– user305707Aug 15 '18 at 2:34

No such rule. Some are grammatical but mean something different from the individual words, some were grammatical long ago but the word pattern is no longer common, some are probably purposely ungrammatical for emphasis or to catch people's attention. There's no real connection between idiom and grammar.
– fixer1234Aug 15 '18 at 2:40

@fixer1234 Pardon me—I was being sarcastic. What I should've said is just because "for the life of me" is an idiom doesn't mean that it doesn't have to be grammatical.
– user305707Aug 15 '18 at 2:42

Thank you for taking the time to provide an answer. You gave examples but no reason why some of the examples are correct and others are not. Please provide grammatical reasons.
– user305707Aug 14 '18 at 20:33

One part of me wants to wait until I have an in-depth etymology of the phrase before answering. But the other part of mine is ungrammatical.

Really, if you think about it, you'll see that it's pretty common to see "of me" (and "of you", "of her", etc.) being possessive, with the "of mine" version being ungrammatical:

The death of me

The end of me

The best of me

The worst of me

The rest of me

One side of me

One half of me

One piece of me

(Some of these can be rewritten as e.g. "my best".)

The OED gives a pretty good explanation of how this sense came about:

Expressing possession and being possessed.E.g. 'the owner of the house', 'the house of the owner'. Generally regarded as one of the central uses of the word. Formerly expressed by the genitive case, and still to some extent by the genitive of nouns (especially proper names) and possessive adjectives (with transposition of order). The use of of began in Old English with senses 33, 34, expressing origin. After the Norman Conquest the example of the French de, which had taken the place of the Latin genitive, caused the gradual extension of of to all uses in which Old English had the genitive; the purely possessive sense was the last to be so affected, and it is that in which the genitive or 'possessive' case is still chiefly used. Thus, we say the King's English, in preference to the English of the King; but the King of England in preference to England's King, which is not natural or ordinary prose English.

The earliest example of the single possessive indicating ownership is the Ormulum's "Þe wlite off enngle kinde" ("the beauty of angel kind").

And it also has this other definition for of with its earliest examples dating back to Middle English:

Followed by a noun in the genitive case or a possessive pronoun.Originally partitive, but subsequently used instead of the simple possessive (of the possessor or author) where this would be awkward or ambiguous, or as equivalent to an appositive phrase; e.g. this son of mine = this my son; a dog of John's = a dog which is John's, a dog belonging to John. The early examples are capable of explanation as partitive, but in later use this is often not possible, and the construction may now be viewed as appositional (see further O. Jespersen On Some Disputed Points in English Grammar (S.P.E. Tract No. XXV, 1926)).