I came across this sentence while reading, and the use of 'palabra' doesn't make sense to me:
Y no es que quiera irme; palabra.
Although it brings up connotations of the very slang usage of word in English.
Yes, it is the same meaning as in English, or at least as I understood from urbandictionary. It means something like "I promise" or "I swear".
About its origin I would say it is a shortened form of "palabra de honor". Cheking RAE for "palabra de honor" it redirects you to the fifth definition of "palabra":
It's short for "te doy mi palabra", meaning "te lo prometo".
You can see in RAE that palabra means "promesa u oferta".