When "him" would be correct, "me" is also correct.
"I" is the subject form -- nominative. "Me" is the object form -- accusative. Thus: He gave it to me. He gave it to me and her.
"Me and my sister went to the store," however, should formally be "My sister and I went to the store." That's because it's the subject, not the object, in this example.
Now, I am cheerfully comfortable with the colloquial spoken "Me and my sister went to the store," and will happily go on using it in speech.
Isn't it interesting the people have concluded that the formal rule is "never use "me" in compounds, whether subject or object" -- rather than "never use me in the subject"? Some grammarians feel that there's something special about compound subjects and objects...