If you borrow money from a friend you may not be able to repay it and this will spoil the friendship. If you lend a friend money you may have to ask him to repay it , and this too will spoil the friendship. So neither borrow money nor lend it.
The proverb is a quotation from Shakespeare’s Hamlet.