Actually it is both The word 名 Ming in Chinese and Na in Japanese means name, fame reputation etc.
The word 前 Qian in Chinese and Mae in Japanese means in front of, before etc.
The word 名字 Mingzi in Chinese might be either your (given) name or full name.
The word 姓 Xing in Chinese means surname, family name.
The word 名前 Mingqian doesn't exsist in Chinese but in Japanese Namae means (given) name.
The word 名字 Myouji menas surname, family name in Japanese.
苗字 another way of writing Myouji in Japanese.
The word 姓 sei also means surname, family name.
In english we have a (fore)name (hence Fore Mae and Name Na in Japanese word order namae) and surname.
In Chinese and Japanese we have a family name and a given name.
The sound namae is pure coincidentle, the kanji Na could have been pronounced as hanasu and Mae as sakana making the Kanji namae pronounced as hanasusakana
I am George Trombley.
My name is George Trombley.
Watashi wa Yamada Ichirou desu.
I am Ichirou Yamada.
Watashi no namae wa Yamada Ichrou to iimasu.
My name is Ichirou Yamada. (When you give a general describtion of your name)
Yamada wa myouji de, Ichrou wa namae desu.
My surname is Yamada and my given name is Ichirou.
But when introducing yourself to others you say:
Yamada to moushimasu.
My name ia Yamada./I am called Yamada.
Wo shi Li Fulin.
I am Li Fulin.
Wo mingzi jiao Li Fulin.
My name is Li Fulin.
My surame is Li and my given name is Fulin.
Wo jiao Li Fulin.
My name is Li Fulin./I am called Li Fulin.