The gemara says that one should be careful to be מסדר שולחנו and eat a meal on motzei shabbos, even if he is only going to eat a small amount. Rashi explains that just as it is a kavod shabbos to honor the shabbos as it enters, it is also a kavod to accompany the shabbos as it leaves, as one would escort a king leaving a city. Based on this, the M.B. (300:2) says that the seudah of melave malka should be as soon as shabbos is over since that is when the king is leaving.
However, in comparison to the other seudos that one is required to eat on Shabbos, the M.B. says that it is not as much of an obligation as the 3 seudos of Shabbos. The 3 seudos of shabbos are learned from a pasuk that repeats the word היום three times, as the gemara says 117b, whereas the seuda of melave malka doesn't have a source in the Torah. For the same reason the Sha'ar HaTziyun writes that if one has a choice on making an elaborate shalosh seudos or an elaborate melave malka, it is preferable to make an elaborate shalosh seudos. Although the M.B. quotes this from the Shulchan Aruch of the Ba'al HaTanya, it is found in Rashi 118a d.h. achlei. The gemara in discussing the number of meals distributed to a poor person only accounts for the 3 meals of Shabbos, and suggests eating the Motzei Shabbos meal early as shalosh seudos. Rashi comments that even though there is a mitzvah to eat shalosh seudos as well, הני מילי למאן דאפשר ליה. Rashi clearly writes that shalosh seudos takes precedence over melave malka.