I tried to post this earlier but I had access issues. Kooyeen is qutie correct, except that "Me and my friend are going" is like fingernails on a chalkboard to me. Anyway, here are my thoughts:
It can be correct to say either "my friend and I" or "my friend and me" depending on whether you and your friend are the subjects of the sentence or the objects.
My friend and I are going to the mall.
He invited both my friend and me.
By convention, we put the other person first, but there is nothing wrong with saying "He invited both me and my friend."
If you say "I and my friend are going to the mall" it will sound off to most natives.