He was the last man to be hangs for murder in this country.

--------------------
In this sentence what is the meaning of 'for'? Does 'for' refer to 'reason' or 'relation', or else?

... to be hanged ...

Yes, "for" refers to the reason why he was hanged.

He was the last man to be hanged for murder in this country. (corrected)

Right!

In the sentence, "He was the last man to be hanged for murder in this country," the word "for" is used as a preposition.

In this context, "for" indicates the reason or cause for which the man was hanged. It shows that the man was hanged because he committed the crime of murder.

To understand the meaning of "for" in this sentence, it may be helpful to consider the structure of the sentence. The subject of the sentence is "He" (the unnamed man), the verb is "was hanged," and the object is "murder." "For" connects the object "murder" to the verb "hanged" and clarifies the reason for the action taking place.