馬上 can be used as an adverb that roughly means "at once" or "immediately", for instance in: 我馬上來幫你. It can also mean "on horseback". Where does the usage with the sense of "at once" originate from, and does it have anything to do with the other meaning of the adverb?
According to "互动百科", it's said that during China's ancient times, a general on horseback was on its way to perform an important task, but he was interrupted midtrip when a messenger caught up to him bringing him a message, which stated that the emperor was deathly ill. He immediately turned around and rode back to see the emperor without alighting from his horse (note: riding in the Forbidden City was strictly forbidden), hence the word "马上" to mean "immediately".
The Chinese or Mandarin as we know now is a Northern language results from generations of invasions (the major one is Mongolia invasion) and trading. 马上 as the meaning of immediate or at once are influence from the northern culture where horse is the way of transportation and carrying message to somewhere else. In more traditional or ancient Chinese, 立刻 or 即刻 (meaning at this moment, immediately) are used. In fact in Cantonese, if you use 马上，people would likely think that you are not Cantonese or your language root is not Cantonese, and 即刻 is still use till this days in most of Cantonese verbal conversation than 马上.