When I was in trouble he borrowed me money.
When I was in trouble he lent me money.
What is the difference between them? Which one is correct?
These two verbs lend and borrow often cause confusion for learners. The main reason is that many languages use just one verb for both of these meanings
The verb lend is like the verb give. It means to give temporarily, not permanently.
The verb borrow is more like the verb take. If you borrow something you are taking it, but temporarily, not permanently.
The verb lend has the same grammar as the verb give. It takes an Indirect Object (the person your giving the thing to) and a Direct Object (the thing that you are giving):
The verb borrow has the same grammar as the verb take. It normally takes a Direct Object (the thing being taken) and it sometimes also takes a preposition phrase headed by the preposition from:
The Original Poster's question
*When I was in trouble he borrowed me money. (ungrammatical)
When I was in trouble he lent me money.
Sentence (1) is incorrect for two reasons. Firstly the subject of the sentence he is giving the money, not taking it. Therefore we need the verb lend not the verb borrow.
Secondly the grammar in sentence (1) is problematic. The verb borrow cannot take an Indirect Object. We can't say "borrow me" in standard English.
Sentence (2) is, of course, perfectly fine. The poster could make a similar sentence with the word borrow, but this would need a different Subject:
When I was in trouble I borrowed money from him.
However, this sentence has a completely different feeling to it.
This is the first installment of a post. The second installment will be much more complicated and will show how He borrowed me some money could be correct but not if me is a normal Object.
It might be worth noting that in some regional varieties of English we can use the verb borrow with the same grammar and meaning as lend, but this does not happen in standard Englishes like Southern Standard British English or General American.]
Although the above answers give lots of details, I prefer the below explanation...
Lend is equivalent to Throw, or Give
You lend money to someone. (Past tense: loaned or sometimes lent)
Borrow is equivalent to Catch, or Receive
You borrow something from them. (Past tense: borrowed)
Note that you can borrow something for someone, but not to them. Like I could catch a ball for you (when a third person throws it), but I could not catch it to you.
They mean different! In second, he gives you money directly. In the first sentence, he does it for you. While the latter is pretty clear, the former is tricky. Let me explain the first.
"He bought me a doll" - he does the action of 'buying'. And 'you' are the one who's receiving. "He borrowed me money" - he does the action of 'borrowing' money (but here from someone), and again, you are the receiver.
He buys a doll. He buys it for me = He bought me a doll
He borrows some money. He borrows it for me = He borrowed me some money
Think of A, B, and C.
If B asks C for a calculator for A, the B actually borrows the gadget for A from C.
A: I want to borrow a calculator from C but I'm feeling shy
B: No worries, I do that for you.
B: Hey C, will you give me your calculator for A as he's feeling shy?
C: Ah, why not. Here it is!
Here, B borrowed A the calculator. Said that, A can say "When I needed it, B borrowed me a calculator"
I found a result from COCA similar to what I said in my comment -
My folks couldn't afford a guitar, so my dad borrowed me a mandolin one time, and I was just learning to play it pretty good and the guy that he borrowed it from wanted it back.
'you' are an indirect object receiving something in both of your sentences.
Which one correct - IMO, both. Do they mean the same - No, they don't.
The direct object for 'borrow' and 'lend' should be an object/material thing. You cannot use it in the first sentence, unless you change 'me' to 'my', but that will make the sense of the sentence wrong.
Also, when it comes to money/financially related terms, 'lend' is the proper verb to use. Borrow is usually used for other objects/material things.